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_r346294251
##########
File path: flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNITCase.java
##########
@@ -56,68 +62,94 @@
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()
{
Review comment:
Sorry, didn't realize that we are actually testing an edge case here. Since
integration testing time is precious, we should try to cover edge cases with
unit tests, which you have already done (`YarnJobClusterEntrypointTest`). That
is, I think we can remove
`testPerJobModeWithDisableSystemClassPathIncludeUserJarAndWithIllegalShipDirectoryName`
and the boolean flag `shipIllegalShipDirectory`.
----------------------------------------------------------------
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