[
https://issues.apache.org/jira/browse/FLINK-8338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16311327#comment-16311327
]
ASF GitHub Bot commented on FLINK-8338:
---------------------------------------
Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/5224#discussion_r159641680
--- Diff:
flink-clients/src/test/java/org/apache/flink/client/cli/CliFrontendAddressConfigurationTest.java
---
@@ -47,36 +49,29 @@ public static void init() {
}
@Test
- public void testValidConfig() {
- try {
- CliFrontend frontend = new
CliFrontend(CliFrontendTestUtils.getConfigDir());
- RunOptions options =
CliFrontendParser.parseRunCommand(new String[] {});
-
- ClusterClient clusterClient =
frontend.retrieveClient(options);
+ public void testValidConfig() throws Exception {
+ CliFrontend frontend = new CliFrontend(
+
GlobalConfiguration.loadConfiguration(CliFrontendTestUtils.getConfigDir()),
+ Collections.singletonList(new DefaultCLI()),
+ CliFrontendTestUtils.getConfigDir());
- checkJobManagerAddress(
- clusterClient.getFlinkConfiguration(),
-
CliFrontendTestUtils.TEST_JOB_MANAGER_ADDRESS,
-
CliFrontendTestUtils.TEST_JOB_MANAGER_PORT);
- }
- catch (Exception e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
- }
-
- @Test(expected = IllegalConfigurationException.class)
- public void testInvalidConfigAndNoOption() throws Exception {
- CliFrontend frontend = new
CliFrontend(CliFrontendTestUtils.getInvalidConfigDir());
RunOptions options = CliFrontendParser.parseRunCommand(new
String[] {});
- frontend.retrieveClient(options);
+ ClusterClient clusterClient = frontend.retrieveClient(options);
+
+ checkJobManagerAddress(
+ clusterClient.getFlinkConfiguration(),
+ CliFrontendTestUtils.TEST_JOB_MANAGER_ADDRESS,
+ CliFrontendTestUtils.TEST_JOB_MANAGER_PORT);
}
@Test
public void testManualOptionsOverridesConfig() {
try {
- CliFrontend frontend = new
CliFrontend(CliFrontendTestUtils.getConfigDir());
+ CliFrontend frontend = new CliFrontend(
--- End diff --
nit: try-catch-exception block was removed in the test above but not here.
> Make CustomCommandLines non static in CliFrontend
> -------------------------------------------------
>
> Key: FLINK-8338
> URL: https://issues.apache.org/jira/browse/FLINK-8338
> 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
>
>
> For better testability and maintainability we should make the
> {{CustomCommandLine}} registration non-static in {{CliFrontend}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)