Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/5220#discussion_r160722901
--- 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)
--- End diff --
True. I'm, however, not a super fan of testing for exception messages. If
the message is changed then you don't see it directly.
---