[ https://issues.apache.org/jira/browse/KAFKA-15639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kirk True updated KAFKA-15639: ------------------------------ Description: The {{testResetPositionsProcessFailureIsIgnored}} test looks like this: {code:java} @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)); } {code} [~junrao] asks: {quote}Not sure if this is a useful test since {{offsetsRequestManager.resetPositionsIfNeeded()}} seems to never directly throw an exception? {quote} I commented out the doThrow line and it did not impact the test. was: The testResetPositionsProcessFailureIsIgnored test looks like this: {code:java} @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)); } {code} I commented out the doThrow Not sure if this is a useful test since {{offsetsRequestManager.resetPositionsIfNeeded()}} seems to never directly throw an exception? > Investigate ConsumerNetworkThread's testResetPositionsProcessFailureIsIgnored > ----------------------------------------------------------------------------- > > Key: KAFKA-15639 > URL: https://issues.apache.org/jira/browse/KAFKA-15639 > Project: Kafka > Issue Type: Sub-task > Components: clients, consumer > Reporter: Kirk True > Assignee: Philip Nee > Priority: Minor > Labels: consumer-threading-refactor > > The {{testResetPositionsProcessFailureIsIgnored}} test looks like this: > > {code:java} > @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)); > } > {code} > > [~junrao] asks: > > {quote}Not sure if this is a useful test since > {{offsetsRequestManager.resetPositionsIfNeeded()}} seems to never directly > throw an exception? > {quote} > > I commented out the doThrow line and it did not impact the test. -- This message was sent by Atlassian Jira (v8.20.10#820010)