Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.10.0
Description
KafkaConsumerTestBase#runFailOnNoBrokerTest has assumptions on the causal chain of the JobExecutionException. In particular, it assumes that the exception caused by user code is the direct cause of JobExecutionException. However, this is no longer true when using the DefaultScheduler, which wraps the exception in an JobException, which additionally specifies the reason of the job recovery suppression.
The code in question is listed below:
} catch (JobExecutionException jee) { if (kafkaServer.getVersion().equals("0.9") || kafkaServer.getVersion().equals("0.10") || kafkaServer.getVersion().equals("0.11") || kafkaServer.getVersion().equals("2.0")) { assertTrue(jee.getCause() instanceof TimeoutException); TimeoutException te = (TimeoutException) jee.getCause(); assertEquals("Timeout expired while fetching topic metadata", te.getMessage()); } else { assertTrue(jee.getCause() instanceof RuntimeException); RuntimeException re = (RuntimeException) jee.getCause(); assertTrue(re.getMessage().contains("Unable to retrieve any partitions")); } }
Attachments
Issue Links
- links to