flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8333) Split command options from deployment options in CliFrontend
Date Wed, 10 Jan 2018 16:05:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16320502#comment-16320502
] 

ASF GitHub Bot commented on FLINK-8333:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5220#discussion_r160721122
  
    --- Diff: flink-clients/src/test/java/org/apache/flink/client/cli/CliFrontendStopTest.java
---
    @@ -99,6 +69,44 @@ public void testStop() throws Exception {
     		}
     	}
     
    +	@Test(expected = CliArgsException.class)
    +	public void testUnrecognizedOption() throws Exception {
    +		// test unrecognized option
    +		String[] parameters = { "-v", "-l" };
    +		CliFrontend testFrontend = new CliFrontend(CliFrontendTestUtils.getConfigDir());
    +		testFrontend.stop(parameters);
    +
    +		fail("Should have failed.");
    +	}
    +
    +	@Test(expected = CliArgsException.class)
    +	public void testMissingJobId() throws Exception {
    +		// test missing job id
    +		String[] parameters = {};
    +		CliFrontend testFrontend = new CliFrontend(CliFrontendTestUtils.getConfigDir());
    +		testFrontend.stop(parameters);
    +
    +		fail("Should have failed.");
    +	}
    +
    +	@Test
    +	public void testUnknownJobId() throws Exception {
    +		// test unknown job Id
    +		JobID jid = new JobID();
    +
    +		String[] parameters = { jid.toString() };
    +		StopTestCliFrontend testFrontend = new StopTestCliFrontend(true);
    +
    +		try {
    +			testFrontend.stop(parameters);
    +			fail("Should have failed.");
    +		} catch (IllegalArgumentException ignored) {
    +			// expected
    +		}
    +
    +		Mockito.verify(testFrontend.client, times(1)).stop(any(JobID.class));
    --- End diff --
    
    True. Will adapt it accordingly.


> 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)

Mime
View raw message