[
https://issues.apache.org/jira/browse/FLINK-8333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16309789#comment-16309789
]
ASF GitHub Bot commented on FLINK-8333:
---------------------------------------
Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/5220#discussion_r159449988
--- Diff:
flink-clients/src/test/java/org/apache/flink/client/cli/CliFrontendCancelTest.java
---
@@ -42,70 +39,54 @@
/**
* Tests for the CANCEL command.
*/
-public class CliFrontendCancelTest {
+public class CliFrontendCancelTest extends TestLogger {
@BeforeClass
public static void init() {
CliFrontendTestUtils.pipeSystemOutToNull();
}
@Test
- public void testCancel() {
- try {
- // test unrecognized option
- {
- String[] parameters = {"-v", "-l"};
- CliFrontend testFrontend = new
CliFrontend(CliFrontendTestUtils.getConfigDir());
- int retCode = testFrontend.cancel(parameters);
- assertTrue(retCode != 0);
- }
-
- // test missing job id
- {
- String[] parameters = {};
- CliFrontend testFrontend = new
CliFrontend(CliFrontendTestUtils.getConfigDir());
- int retCode = testFrontend.cancel(parameters);
- assertTrue(retCode != 0);
- }
+ public void testCancel() throws Exception {
- // test cancel properly
- {
- JobID jid = new JobID();
+ // test cancel properly
+ {
+ JobID jid = new JobID();
- String[] parameters = { jid.toString() };
- CancelTestCliFrontend testFrontend = new
CancelTestCliFrontend(false);
+ String[] parameters = { jid.toString() };
+ CancelTestCliFrontend testFrontend = new
CancelTestCliFrontend(false);
- int retCode = testFrontend.cancel(parameters);
- assertTrue(retCode == 0);
+ int retCode = testFrontend.cancel(parameters);
+ assertTrue(retCode == 0);
--- End diff --
nit: Code is copied but it's better to use `assertEquals` for proper
failure reasons.
> Split command options from deployment options in CliFrontend
> ------------------------------------------------------------
>
> Key: FLINK-8333
> URL: https://issues.apache.org/jira/browse/FLINK-8333
> 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
>
>
> In order to better support different {{CustomCommandLines}} we should split
> the command and deployment option parsing in the {{CliFrontend}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)