You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "hgeraldino (via GitHub)" <gi...@apache.org> on 2024/03/10 14:01:23 UTC

Re: [PR] KAFKA-14683 Cleanup WorkerSinkTaskTest [kafka]

hgeraldino commented on PR #15506:
URL: https://github.com/apache/kafka/pull/15506#issuecomment-1987243289

   > @hgeraldino thank for this patch. Could you please apply `assertThrow` to this class? For example, the following assert can be rewritten. _origin_
   > 
   > ```java
   >         try {
   >             workerTask.iteration();
   >             fail("Poll should have raised the rebalance exception");
   >         } catch (RuntimeException e) {
   >             assertEquals(exception, e);
   >         }
   > ```
   > 
   > _new_
   > 
   > ```java
   > assertEquals(exception, assertThrows(RuntimeException.class, () -> workerTask.iteration()));
   > ```
   
   Sure thing! 
   Done


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org