[ISSUE #2645] Fix unit case NPE in DefaultMessageStoreShutDownTest#testDispatchBehindWhenShutdown

This commit is contained in:
赵延
2021-02-15 21:01:21 +08:00
committed by GitHub
parent 0d8a184ad1
commit 606de993d3
@@ -40,10 +40,11 @@ public class DefaultMessageStoreShutDownTest {
@Before
public void init() throws Exception {
messageStore = spy(buildMessageStore());
boolean load = messageStore.load();
DefaultMessageStore store = buildMessageStore();
boolean load = store.load();
assertTrue(load);
messageStore.start();
store.start();
messageStore = spy(store);
when(messageStore.dispatchBehindBytes()).thenReturn(100L);
}