GJL commented on a change in pull request #10152: [FLINK-14466][runtime] Let YarnJobClusterEntrypoint use user code class loader URL: https://github.com/apache/flink/pull/10152#discussion_r347821445
########## File path: flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java ########## @@ -511,6 +496,20 @@ public void testEnvironmentEmptyPluginsShipping() { } } + @Test + public void testDisableSystemClassPathIncludeUserJarAndWithIllegalShipDirectoryName() throws IOException { + final Configuration configuration = new Configuration(); + configuration.setString(CLASSPATH_INCLUDE_USER_JAR, YarnConfigOptions.UserJarInclusion.DISABLED.toString()); + + final YarnClusterDescriptor yarnClusterDescriptor = createYarnClusterDescriptor(configuration); + try { + yarnClusterDescriptor.addShipFiles(Collections.singletonList(temporaryFolder.newFolder(ConfigConstants.DEFAULT_FLINK_USR_LIB_DIR))); + fail(); + } catch (IllegalArgumentException exception) { + assertTrue(ExceptionUtils.findThrowableWithMessage(exception, "This is an illegal ship directory :").isPresent()); Review comment: I will simplify this to `assertThat(exception.getMessage(), containsString("This is an illegal ship directory :"));` before merging. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services