guoweiM 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_r345551422
 
 

 ##########
 File path: flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNITCase.java
 ##########
 @@ -56,68 +63,96 @@
 
        private final int sleepIntervalInMS = 100;
 
+       @Rule
+       public final TemporaryFolder temporaryFolder = new TemporaryFolder();
+
        @BeforeClass
        public static void setup() {
                YARN_CONFIGURATION.set(YarnTestBase.TEST_CLUSTER_NAME_KEY, 
"flink-yarn-tests-per-job");
                startYARNWithConfig(YARN_CONFIGURATION);
        }
 
        @Test
-       public void testPerJobMode() throws Exception {
-               runTest(() -> {
-                       Configuration configuration = new Configuration();
-                       configuration.setString(AkkaOptions.ASK_TIMEOUT, "30 
s");
-                       final YarnClient yarnClient = getYarnClient();
+       public void testPerJobModeWithEnableSystemClassPathIncludeUserJar() 
throws Exception {
+               runTest(() -> 
deployPerjob(YarnConfigOptions.UserJarInclusion.FIRST, false));
+       }
 
-                       try (final YarnClusterDescriptor yarnClusterDescriptor 
= org.apache.flink.yarn.YarnTestUtils.createClusterDescriptorWithLogging(
-                                       
System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR),
-                                       configuration,
-                                       getYarnConfiguration(),
-                                       yarnClient,
-                                       true)) {
+       @Test
+       public void testPerJobModeWithDisableSystemClassPathIncludeUserJar() 
throws Exception {
+               runTest(() -> 
deployPerjob(YarnConfigOptions.UserJarInclusion.DISABLED, false));
+       }
 
-                               yarnClusterDescriptor.setLocalJarPath(new 
Path(flinkUberjar.getAbsolutePath()));
-                               
yarnClusterDescriptor.addShipFiles(Arrays.asList(flinkLibFolder.listFiles()));
-                               
yarnClusterDescriptor.addShipFiles(Arrays.asList(flinkShadedHadoopDir.listFiles()));
+       @Test
+       public void 
testPerJobModeWithDisableSystemClassPathIncludeUserJarAndWithIllegalShipDirectoryName()
 {
+               try {
+                       runTest(() -> 
deployPerjob(YarnConfigOptions.UserJarInclusion.DISABLED, true));
+                       fail();
+               } catch (Exception e) {
 
 Review comment:
   ok. I will fix it.

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

Reply via email to