Github user aljoscha commented on a diff in the pull request:
https://github.com/apache/flink/pull/5901#discussion_r185449249
--- Diff:
flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
---
@@ -85,54 +88,75 @@ public void checkForProhibitedLogContents() {
public void testDetachedMode() throws InterruptedException, IOException
{
LOG.info("Starting testDetachedMode()");
addTestAppender(FlinkYarnSessionCli.class, Level.INFO);
- Runner runner =
- startWithArgs(new String[]{"-j",
flinkUberjar.getAbsolutePath(),
- "-t",
flinkLibFolder.getAbsolutePath(),
- "-n", "1",
- "-jm", "768",
- "-tm", "1024",
- "--name", "MyCustomName", //
test setting a custom name
- "--detached"},
- "Flink JobManager is now running on",
RunTypes.YARN_SESSION);
-
+ File exampleJarLocation =
getTestJarPath("StreamingWordCount.jar");
+ // get temporary file for reading input data for wordcount
example
+ File tmpInFile;
+ try {
+ tmpInFile = tmp.newFile();
+ FileUtils.writeStringToFile(tmpInFile,
WordCountData.TEXT);
+ }
+ catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ Runner runner = isNewMode ?
+ startWithArgs(new String[]{"run", "-m",
"yarn-cluster",
+ "-yj",
flinkUberjar.getAbsolutePath(),
+ "-yt",
flinkLibFolder.getAbsolutePath(),
+ "-yn", "1",
+ "-yjm", "768",
+ "-ytm", "1024",
+ "-ynm",
"MyCustomName", // test setting a custom name
+ "--detached",
exampleJarLocation.getAbsolutePath(),
+ "--input",
tmpInFile.getAbsoluteFile().toString()},
+ "Job has been submitted with
JobID", RunTypes.CLI_FRONTEND) :
--- End diff --
This is now testing per-job mode, which is tested in `YARNITCase`. This
ITCase is for YARN session mode.
`YARNITCase` should probably be called `YARNPerJobITCase` and we should
also have a `YARNPerJobSecuredITCase`.
---