[ 
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}
 

I commented out the doThrow

 

Not sure if this is a useful test since 
{{offsetsRequestManager.resetPositionsIfNeeded()}} seems to never directly 
throw an exception?

  was:
Regarding this comment in {{{}testPollResultTimer{}}}...
{code:java}
// purposely setting a non-MAX time to ensure it is returning Long.MAX_VALUE 
upon success|
{code}
[~junrao] asked:
{quote}Which call is returning Long.MAX_VALUE?
{quote}


> 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}
>  
> I commented out the doThrow
>  
> Not sure if this is a useful test since 
> {{offsetsRequestManager.resetPositionsIfNeeded()}} seems to never directly 
> throw an exception?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to