You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/11/08 13:39:00 UTC

[jira] [Updated] (FLINK-14680) Enable KafkaConsumerTestBase#runFailOnNoBrokerTest to pass with new DefaultScheduler

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

ASF GitHub Bot updated FLINK-14680:
-----------------------------------
    Labels: pull-request-available  (was: )

> Enable KafkaConsumerTestBase#runFailOnNoBrokerTest to pass with new DefaultScheduler
> ------------------------------------------------------------------------------------
>
>                 Key: FLINK-14680
>                 URL: https://issues.apache.org/jira/browse/FLINK-14680
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Coordination, Tests
>    Affects Versions: 1.10.0
>            Reporter: Gary Yao
>            Assignee: Gary Yao
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.10.0
>
>
> {{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:
> {code:java}
> 		} 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"));
> 			}
> 		}
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)