SLIDER-622 try and make TestStandaloneAgentAM more resilient to delayed-deletion
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/f1932ea6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/f1932ea6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/f1932ea6 Branch: refs/heads/releases/slider-0.60 Commit: f1932ea63421721b6df140d691dc80f3234417ee Parents: d704530 Author: Steve Loughran <[email protected]> Authored: Mon Nov 10 22:40:33 2014 +0000 Committer: Steve Loughran <[email protected]> Committed: Mon Nov 10 22:48:10 2014 +0000 ---------------------------------------------------------------------- .../apache/slider/agent/standalone/TestStandaloneAgentAM.groovy | 1 + .../groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy | 3 +++ 2 files changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f1932ea6/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneAgentAM.groovy ---------------------------------------------------------------------- diff --git a/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneAgentAM.groovy b/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneAgentAM.groovy index 7987661..93547f1 100644 --- a/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneAgentAM.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneAgentAM.groovy @@ -127,6 +127,7 @@ class TestStandaloneAgentAM extends AgentMiniClusterTestBase { assert oldInstance != null assert oldInstance.yarnApplicationState >= YarnApplicationState.FINISHED + sleep(5000) //create another AM launcher = createStandaloneAM(clustername, true, true) client = launcher.service http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f1932ea6/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy ---------------------------------------------------------------------- diff --git a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy index 96b1aae..dde8239 100644 --- a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy @@ -494,6 +494,9 @@ public abstract class YarnMiniClusterTestBase extends ServiceLauncherBaseTest { //this is a safety check to stop us doing something stupid like deleting / assert clusterDir.toString().contains("/.slider/") dfs.delete(clusterDir, true) + sleep(1000) + dfs.delete(clusterDir, true) + assert !dfs.exists(clusterDir), "delete operation failed âapplication in use?" }
