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/04 18:18:22 UTC
[2/2] git commit: SLIDER-201 make test teardown more resilient
SLIDER-201 make test teardown more resilient
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/2669800d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/2669800d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/2669800d
Branch: refs/heads/develop
Commit: 2669800d72e5b88dba49eef7ba3a719233310ed8
Parents: 878809e
Author: Steve Loughran <st...@apache.org>
Authored: Tue Nov 4 15:51:28 2014 +0000
Committer: Steve Loughran <st...@apache.org>
Committed: Tue Nov 4 17:18:10 2014 +0000
----------------------------------------------------------------------
.../slider/agent/AgentMiniClusterTestBase.groovy | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/2669800d/slider-core/src/test/groovy/org/apache/slider/agent/AgentMiniClusterTestBase.groovy
----------------------------------------------------------------------
diff --git a/slider-core/src/test/groovy/org/apache/slider/agent/AgentMiniClusterTestBase.groovy b/slider-core/src/test/groovy/org/apache/slider/agent/AgentMiniClusterTestBase.groovy
index c2ea54a..e8bc4b2 100644
--- a/slider-core/src/test/groovy/org/apache/slider/agent/AgentMiniClusterTestBase.groovy
+++ b/slider-core/src/test/groovy/org/apache/slider/agent/AgentMiniClusterTestBase.groovy
@@ -44,7 +44,6 @@ public abstract class AgentMiniClusterTestBase
extends YarnZKMiniClusterTestBase {
protected static File agentConf
protected static File agentDef
- protected static File imagePath
protected static Map<String, String> agentDefOptions
private static TemporaryFolder tempFolder = new TemporaryFolder();
@@ -89,13 +88,16 @@ extends YarnZKMiniClusterTestBase {
@AfterClass
public static void cleanSubConfFiles() {
- def tempRoot = tempFolder.root
- if (tempRoot.exists()) {
- try {
+ def tempRoot
+ try {
+ tempRoot = tempFolder.root
+ if (tempRoot.exists()) {
FileUtils.deleteDirectory(tempRoot);
- } catch (IOException e) {
- log.info("Failed to delete $tempRoot :$e", e)
}
+ } catch (IOException e) {
+ log.info("Failed to delete $tempRoot :$e", e)
+ } catch (IllegalStateException e) {
+ log.warn("Temp folder deletion failed: $e")
}
}