HDDS-849. Fix NPE in TestKeyValueHandler because of audit log write.
Contributed by Dinesh Chitlangia.
This commit is contained in:
parent
8b23814415
commit
e7438a1b38
|
@ -90,6 +90,10 @@ public class TestKeyValueHandler {
|
||||||
Mockito.when(handler.handle(any(), any())).thenCallRealMethod();
|
Mockito.when(handler.handle(any(), any())).thenCallRealMethod();
|
||||||
doCallRealMethod().when(dispatcher).setMetricsForTesting(any());
|
doCallRealMethod().when(dispatcher).setMetricsForTesting(any());
|
||||||
dispatcher.setMetricsForTesting(Mockito.mock(ContainerMetrics.class));
|
dispatcher.setMetricsForTesting(Mockito.mock(ContainerMetrics.class));
|
||||||
|
Mockito.when(dispatcher.buildAuditMessageForFailure(any(), any(), any()))
|
||||||
|
.thenCallRealMethod();
|
||||||
|
Mockito.when(dispatcher.buildAuditMessageForSuccess(any(), any()))
|
||||||
|
.thenCallRealMethod();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue