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 16:51:41 UTC
git commit: SLIDER-201 make test teardown more resilient
Repository: incubator-slider
Updated Branches:
refs/heads/feature/SLIDER-201-jenkins-windows 294836960 -> e7477dc11
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/e7477dc1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/e7477dc1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/e7477dc1
Branch: refs/heads/feature/SLIDER-201-jenkins-windows
Commit: e7477dc11f1b5645aa465e92ef5dfd10d712cd96
Parents: 2948369
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 15:51:28 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/e7477dc1/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")
}
}