dawidwys commented on a change in pull request #7883: [FLINK-11781][yarn]
Remove "DISABLED" as possible value for yarn.per-job-cluster.include-user-jar
URL: https://github.com/apache/flink/pull/7883#discussion_r262546655
##########
File path:
flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java
##########
@@ -89,6 +91,27 @@ public static void tearDownClass() {
yarnClient.stop();
}
+ /**
+ * @see <a
href="https://issues.apache.org/jira/browse/FLINK-11781">FLINK-11781</a>
+ */
+ @Test
+ public void
testThrowsExceptionIfUserTriesToDisableUserJarInclusionInSystemClassPath() {
+ final Configuration configuration = new Configuration();
+
configuration.setString(YarnConfigOptions.CLASSPATH_INCLUDE_USER_JAR,
"DISABLED");
+
+ try {
+ new YarnClusterDescriptor(
+ configuration,
+ yarnConfiguration,
+ temporaryFolder.getRoot().getAbsolutePath(),
+ yarnClient,
+ true);
+ fail("Expected exception not thrown");
+ } catch (final IllegalArgumentException e) {
+ assertThat(e.getMessage(), containsString("cannot be
set to DISABLED anymore"));
Review comment:
nit: As before -> I prefer the `@Rule` approach.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services