[
https://issues.apache.org/jira/browse/FLINK-8347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16316731#comment-16316731
]
ASF GitHub Bot commented on FLINK-8347:
---------------------------------------
Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/5232#discussion_r160216156
--- Diff:
flink-clients/src/test/java/org/apache/flink/client/cli/CliFrontendStopTest.java
---
@@ -98,24 +103,26 @@ public void testUnknownJobId() throws Exception {
JobID jid = new JobID();
String[] parameters = { jid.toString() };
- final ClusterClient clusterClient = createClusterClient(true);
+ String expectedMessage = "Test exception";
+ FlinkException testException = new
FlinkException(expectedMessage);
+ final ClusterClient<String> clusterClient =
createClusterClient(testException);
MockedCliFrontend testFrontend = new
MockedCliFrontend(clusterClient);
try {
testFrontend.stop(parameters);
fail("Should have failed.");
- } catch (IllegalArgumentException ignored) {
- // expected
+ } catch (FlinkException e) {
+ assertTrue(ExceptionUtils.findThrowableWithMessage(e,
expectedMessage).isPresent());
}
Mockito.verify(clusterClient, times(1)).stop(any(JobID.class));
--- End diff --
I think I have written it on a previous PR: `verify` shouldn't be needed
because you already assert if the exception was thrown.
> Make Cluster id typesafe
> ------------------------
>
> Key: FLINK-8347
> URL: https://issues.apache.org/jira/browse/FLINK-8347
> Project: Flink
> Issue Type: Sub-task
> Components: Client
> Affects Versions: 1.5.0
> Reporter: Till Rohrmann
> Assignee: Till Rohrmann
> Labels: flip-6
> Fix For: 1.5.0
>
>
> Currently, the cluster id is of type {{String}}. We should make the id
> typesafe to avoid mixups between different {{CustomCommandLines}} and
> {{ClusterDescriptors}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)