flink git commit: [FLINK-3706] Fix YARN test instability
Repository: flink Updated Branches: refs/heads/release-1.1 2203f743a -> c9433bf60 [FLINK-3706] Fix YARN test instability The most important change in this commit is that the `YarnTestBase.Runner` doesn't do "try {} catch (Throwable t) { fail(t); }" anymore, which doesn't lead to a test failure, because its called outside the main thread. With the change, all throwables are reported back to the main thread and fail the test there properly (many YARN tests benefit from this change). This closes #2622 Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/c9433bf6 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/c9433bf6 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/c9433bf6 Branch: refs/heads/release-1.1 Commit: c9433bf6073d8ad7a4892cb9f020105b6a7f8d72 Parents: 2203f74 Author: Robert Metzger Authored: Mon Oct 10 17:04:16 2016 +0200 Committer: Robert Metzger Committed: Wed Oct 12 12:00:40 2016 +0200 -- .../YARNSessionCapacitySchedulerITCase.java | 13 ++--- .../flink/yarn/YARNSessionFIFOITCase.java | 17 +-- .../org/apache/flink/yarn/YarnTestBase.java | 50 +++- 3 files changed, 36 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/flink/blob/c9433bf6/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java -- diff --git a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java index 513a9fc..7f5143d 100644 --- a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java +++ b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java @@ -322,12 +322,13 @@ public class YARNSessionCapacitySchedulerITCase extends YarnTestBase { } /** -* Test deployment to non-existing queue. (user-reported error) -* Deployment to the queue is possible because there are no queues, so we don't check. +* Test deployment to non-existing queue & ensure that the system logs a WARN message +* for the user. (Users had unexpected behavior of Flink on YARN because they mistyped the +* target queue. With an error message, we can help users identifying the issue) */ @Test - public void testNonexistingQueue() { - LOG.info("Starting testNonexistingQueue()"); + public void testNonexistingQueueWARNmessage() { + LOG.info("Starting testNonexistingQueueWARNmessage()"); addTestAppender(YarnClusterDescriptor.class, Level.WARN); runWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(), "-t", flinkLibFolder.getAbsolutePath(), @@ -335,8 +336,8 @@ public class YARNSessionCapacitySchedulerITCase extends YarnTestBase { "-jm", "768", "-tm", "1024", "-qu", "doesntExist"}, "to unknown queue: doesntExist", null, RunTypes.YARN_SESSION, 1); - checkForLogString("The specified queue 'doesntExist' does not exist. Available queues: default, qa-team"); - LOG.info("Finished testNonexistingQueue()"); + checkForLogString("The specified queue 'doesntExist' does not exist. Available queues"); + LOG.info("Finished testNonexistingQueueWARNmessage()"); } /** http://git-wip-us.apache.org/repos/asf/flink/blob/c9433bf6/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java -- diff --git a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java index 8a2ad60..0a22a38 100644 --- a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java +++ b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java @@ -84,7 +84,7 @@ public class YARNSessionFIFOITCase extends YarnTestBase { public void testDetachedMode() { LOG.info("Starting testDetachedMode()"); addTestAppender(FlinkYarnSessionCli.class, Level.INFO); - Runner runner = startWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(), + startWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(), "-t", flinkLibFolder.getAbsolutePath(), "-n", "1",
flink git commit: [FLINK-3706] Fix YARN test instability
Repository: flink Updated Branches: refs/heads/master 1dda3ad00 -> 7b79c8b52 [FLINK-3706] Fix YARN test instability The most important change in this commit is that the `YarnTestBase.Runner` doesn't do "try {} catch (Throwable t) { fail(t); }" anymore, which doesn't lead to a test failure, because its called outside the main thread. With the change, all throwables are reported back to the main thread and fail the test there properly (many YARN tests benefit from this change). This closes #2622 Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/7b79c8b5 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/7b79c8b5 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/7b79c8b5 Branch: refs/heads/master Commit: 7b79c8b52832e3a99e565e865831b56615416ae7 Parents: 1dda3ad Author: Robert Metzger Authored: Mon Oct 10 17:04:16 2016 +0200 Committer: Robert Metzger Committed: Wed Oct 12 11:58:35 2016 +0200 -- .../YARNSessionCapacitySchedulerITCase.java | 13 ++--- .../flink/yarn/YARNSessionFIFOITCase.java | 17 +-- .../yarn/YARNSessionFIFOSecuredITCase.java | 3 -- .../org/apache/flink/yarn/YarnTestBase.java | 50 +++- 4 files changed, 36 insertions(+), 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/flink/blob/7b79c8b5/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java -- diff --git a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java index 650397d..ec66eb2 100644 --- a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java +++ b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java @@ -309,12 +309,13 @@ public class YARNSessionCapacitySchedulerITCase extends YarnTestBase { } /** -* Test deployment to non-existing queue. (user-reported error) -* Deployment to the queue is possible because there are no queues, so we don't check. +* Test deployment to non-existing queue & ensure that the system logs a WARN message +* for the user. (Users had unexpected behavior of Flink on YARN because they mistyped the +* target queue. With an error message, we can help users identifying the issue) */ @Test - public void testNonexistingQueue() { - LOG.info("Starting testNonexistingQueue()"); + public void testNonexistingQueueWARNmessage() { + LOG.info("Starting testNonexistingQueueWARNmessage()"); addTestAppender(YarnClusterDescriptor.class, Level.WARN); runWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(), "-t", flinkLibFolder.getAbsolutePath(), @@ -322,8 +323,8 @@ public class YARNSessionCapacitySchedulerITCase extends YarnTestBase { "-jm", "768", "-tm", "1024", "-qu", "doesntExist"}, "to unknown queue: doesntExist", null, RunTypes.YARN_SESSION, 1); - checkForLogString("The specified queue 'doesntExist' does not exist. Available queues: default, qa-team"); - LOG.info("Finished testNonexistingQueue()"); + checkForLogString("The specified queue 'doesntExist' does not exist. Available queues"); + LOG.info("Finished testNonexistingQueueWARNmessage()"); } /** http://git-wip-us.apache.org/repos/asf/flink/blob/7b79c8b5/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java -- diff --git a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java index ca696f9..c5659eb 100644 --- a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java +++ b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java @@ -84,7 +84,7 @@ public class YARNSessionFIFOITCase extends YarnTestBase { public void testDetachedMode() { LOG.info("Starting testDetachedMode()"); addTestAppender(FlinkYarnSessionCli.class, Level.INFO); - Runner runner = startWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(), + startWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(), "-t", flinkLibFolder.getAbsolutePath(),