Details
-
Test
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
Description
The testResetPositionsProcessFailureIsIgnored test looks like this:
@Test public void testResetPositionsProcessFailureIsIgnored() { doThrow(new NullPointerException()).when(offsetsRequestManager).resetPositionsIfNeeded(); ResetPositionsApplicationEvent event = new ResetPositionsApplicationEvent(); applicationEventsQueue.add(event); assertDoesNotThrow(() -> consumerNetworkThread.runOnce()); verify(applicationEventProcessor).process(any(ResetPositionsApplicationEvent.class)); }
junrao asks:
Not sure if this is a useful test since offsetsRequestManager.resetPositionsIfNeeded() seems to never directly throw an exception?
I commented out the doThrow line and it did not impact the test.