Repository: knox Updated Branches: refs/heads/master 773ac9d8e -> 5c95ab4e3
KNOX-1004 Failing (flaky) Knox unit tests Signed-off-by: Colm O hEigeartaigh <cohei...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/knox/repo Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/5c95ab4e Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/5c95ab4e Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/5c95ab4e Branch: refs/heads/master Commit: 5c95ab4e31ee547807e83e4b2d972b4d33da9eb2 Parents: 773ac9d Author: Denes Bodo <bod.de...@gmail.com> Authored: Mon Sep 11 15:15:02 2017 +0200 Committer: Colm O hEigeartaigh <cohei...@apache.org> Committed: Mon Sep 11 14:30:14 2017 +0100 ---------------------------------------------------------------------- .../org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java | 4 +++- .../test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java | 4 +++- .../test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/knox/blob/5c95ab4e/gateway-test/src/test/java/org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java ---------------------------------------------------------------------- diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java index a55a519..e1b6d2b 100644 --- a/gateway-test/src/test/java/org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java +++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java @@ -94,7 +94,9 @@ public class AmbariServiceDefinitionTest { @After public void cleanupTest() throws Exception { FileUtils.cleanDirectory( new File( config.getGatewayTopologyDir() ) ); - FileUtils.cleanDirectory( new File( config.getGatewayDeploymentDir() ) ); + // Test run should not fail if deleting deployment files is not successful. + // Deletion has been already done by TopologyService. + FileUtils.deleteQuietly( new File( config.getGatewayDeploymentDir() ) ); } public static void setupGateway() throws Exception { http://git-wip-us.apache.org/repos/asf/knox/blob/5c95ab4e/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java ---------------------------------------------------------------------- diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java index a78506d..cd7a9fe 100644 --- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java +++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java @@ -99,7 +99,9 @@ public class GatewayAppFuncTest { @After public void cleanupTest() throws Exception { FileUtils.cleanDirectory( new File( config.getGatewayTopologyDir() ) ); - FileUtils.cleanDirectory( new File( config.getGatewayDeploymentDir() ) ); + // Test run should not fail if deleting deployment files is not successful. + // Deletion has been already done by TopologyService. + FileUtils.deleteQuietly( new File( config.getGatewayDeploymentDir() ) ); } public static void setupGateway() throws Exception { http://git-wip-us.apache.org/repos/asf/knox/blob/5c95ab4e/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java ---------------------------------------------------------------------- diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java index 92c5d06..86a411d 100644 --- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java +++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java @@ -119,7 +119,9 @@ public class GatewaySslFuncTest { @After public void cleanupTest() throws Exception { FileUtils.cleanDirectory( new File( config.getGatewayTopologyDir() ) ); - FileUtils.cleanDirectory( new File( config.getGatewayDeploymentDir() ) ); + // Test run should not fail if deleting deployment files is not successful. + // Deletion has been already done by TopologyService. + FileUtils.deleteQuietly( new File( config.getGatewayDeploymentDir() ) ); } public static void setupGateway() throws Exception {