Repository: incubator-slider Updated Branches: refs/heads/develop 4a8de6545 -> 226e27e45
SLIDER-836 add a branch-2.7 profile; testutils to relay the exception,. and TestBuildStandaloneAM to clean the test dir Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/226e27e4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/226e27e4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/226e27e4 Branch: refs/heads/develop Commit: 226e27e459d8fcb8613baeb6c23b0901ad3d8003 Parents: 4a8de65 Author: Steve Loughran <[email protected]> Authored: Wed Apr 1 16:34:16 2015 +0100 Committer: Steve Loughran <[email protected]> Committed: Wed Apr 1 16:34:16 2015 +0100 ---------------------------------------------------------------------- pom.xml | 18 +++++++++--------- .../agent/standalone/TestBuildStandaloneAM.groovy | 3 ++- .../org/apache/slider/test/SliderTestUtils.groovy | 12 ++++++------ 3 files changed, 17 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/226e27e4/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 16bdd72..bd04e5a 100644 --- a/pom.xml +++ b/pom.xml @@ -1588,26 +1588,26 @@ </profile> <profile> - <!-- hadoop branch-2 builds --> - <id>branch-2</id> + <!-- hadoop branch-2.7 builds --> + <id>branch-2.7</id> <properties> <hadoop.version>2.7.0-SNAPSHOT</hadoop.version> </properties> </profile> - + <profile> - <!-- hadoop trunk builds --> - <id>trunk</id> + <!-- hadoop branch-2 builds --> + <id>branch-2</id> <properties> - <hadoop.version>3.0.0-SNAPSHOT</hadoop.version> + <hadoop.version>2.8.0-SNAPSHOT</hadoop.version> </properties> </profile> <profile> - <!-- Java 7 build --> - <id>java7</id> + <!-- hadoop trunk builds --> + <id>trunk</id> <properties> - <project.java.src.version>7</project.java.src.version> + <hadoop.version>3.0.0-SNAPSHOT</hadoop.version> </properties> </profile> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/226e27e4/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestBuildStandaloneAM.groovy ---------------------------------------------------------------------- diff --git a/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestBuildStandaloneAM.groovy b/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestBuildStandaloneAM.groovy index d72110e..5495e62 100644 --- a/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestBuildStandaloneAM.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestBuildStandaloneAM.groovy @@ -100,13 +100,14 @@ class TestBuildStandaloneAM extends AgentMiniClusterTestBase { waitForClusterLive(thawed) // in the same code (for speed), create an illegal cluster + // with a negative role count try { ServiceLauncher<SliderClient> cluster3 = createOrBuildCluster( SliderActions.ACTION_BUILD, "illegalcluster", ["role1": -1], [], - false, + true, false, agentDefOptions) fail("expected an exception, got $cluster3.service") http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/226e27e4/slider-core/src/test/groovy/org/apache/slider/test/SliderTestUtils.groovy ---------------------------------------------------------------------- diff --git a/slider-core/src/test/groovy/org/apache/slider/test/SliderTestUtils.groovy b/slider-core/src/test/groovy/org/apache/slider/test/SliderTestUtils.groovy index 288926c..03c3342 100644 --- a/slider-core/src/test/groovy/org/apache/slider/test/SliderTestUtils.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/test/SliderTestUtils.groovy @@ -891,15 +891,15 @@ class SliderTestUtils extends Assert { int exitCode, String text = "") { if (exitCode != ex.exitCode) { - log.warn( - "Wrong exit code, expected $exitCode but got $ex.exitCode in $ex", - ex) - assert exitCode == ex.exitCode + def message = "Wrong exit code, expected $exitCode but got $ex.exitCode in $ex" + log.warn(message, ex) + throw new AssertionError(message, ex) } if (text) { if (!(ex.toString().contains(text))) { - log.warn("String match for \"${text}\"failed in $ex", ex) - assert ex.toString().contains(text); + def message = "String match for \"${text}\"failed in $ex" + log.warn(message, ex) + throw new AssertionError(message, ex) } } }
