You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Kirk True (Jira)" <ji...@apache.org> on 2024/01/11 18:53:00 UTC

[jira] [Assigned] (KAFKA-15639) Investigate ConsumerNetworkThreadTest's testResetPositionsProcessFailureIsIgnored

     [ https://issues.apache.org/jira/browse/KAFKA-15639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kirk True reassigned KAFKA-15639:
---------------------------------

    Assignee: Kirk True  (was: Philip Nee)

> Investigate ConsumerNetworkThreadTest's testResetPositionsProcessFailureIsIgnored
> ---------------------------------------------------------------------------------
>
>                 Key: KAFKA-15639
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15639
>             Project: Kafka
>          Issue Type: Test
>          Components: clients, consumer, unit tests
>            Reporter: Kirk True
>            Assignee: Kirk True
>            Priority: Minor
>              Labels: consumer-threading-refactor
>             Fix For: 3.8.0
>
>
> 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)