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/d148f5e9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/d148f5e9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/d148f5e9 Branch: refs/heads/feature/SLIDER-622-windows Commit: d148f5e9a24263a8bc27fbe9488c1618cbae677a Parents: b8f3aa9 Author: Steve Loughran <[email protected]> Authored: Mon Nov 10 22:40:33 2014 +0000 Committer: Steve Loughran <[email protected]> Committed: Mon Nov 10 22:40:33 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/d148f5e9/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/d148f5e9/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 78b5fb9..dcc55f6 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 @@ -516,6 +516,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?" }
