You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/11/10 23:48:47 UTC

[18/23] incubator-slider git commit: SLIDER-622 try and make TestStandaloneAgentAM more resilient to delayed-deletion

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 <st...@apache.org>
Authored: Mon Nov 10 22:40:33 2014 +0000
Committer: Steve Loughran <st...@apache.org>
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?"
     }