This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch branch-4.11
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/branch-4.11 by this push:
new 03504e4 fix: TableStoreImplTest failed because of NPE in
AbstractStateStoreWithJournal initialization (test/mock issue)
03504e4 is described below
commit 03504e47982fd9d41cf7864a769ec8ad7678f758
Author: Andrey Yegorov <[email protected]>
AuthorDate: Tue Feb 2 01:13:08 2021 -0800
fix: TableStoreImplTest failed because of NPE in
AbstractStateStoreWithJournal initialization (test/mock issue)
Descriptions of the changes in this PR:
fixed mock creation.
### Motivation
tests fail
### Changes
fixed mock creation
Master Issue: #2572
Reviewers: Enrico Olivelli <[email protected]>
This closes #2573 from dlg99/master-fix-tabletest-npe
(cherry picked from commit dc235fe75cb19e3077140927a6702dc934124738)
Signed-off-by: Enrico Olivelli <[email protected]>
---
.../bookkeeper/stream/storage/impl/store/MVCCAsyncStoreTestBase.java | 1 +
1 file changed, 1 insertion(+)
diff --git
a/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/store/MVCCAsyncStoreTestBase.java
b/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/store/MVCCAsyncStoreTestBase.java
index 318cba0..de3bc81 100644
---
a/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/store/MVCCAsyncStoreTestBase.java
+++
b/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/store/MVCCAsyncStoreTestBase.java
@@ -57,6 +57,7 @@ public abstract class MVCCAsyncStoreTestBase {
when(namespace.openLog(anyString())).thenReturn(dlm);
AsyncLogWriter logWriter = mock(AsyncLogWriter.class);
when(dlm.openAsyncLogWriter()).thenReturn(FutureUtils.value(logWriter));
+
when(dlm.openAsyncLogWriter(any())).thenReturn(FutureUtils.value(logWriter));
when(logWriter.getLastTxId()).thenReturn(-1L);
DLSN dlsn = new DLSN(0L, 0L, 0L);
when(logWriter.write(any(LogRecord.class))).thenReturn(FutureUtils.value(dlsn));