Repository: incubator-slider
Updated Branches:
  refs/heads/develop 39a6fc4d4 -> 2d2062af0


SLIDER-797 IDE complaining about code paths; inline fail()


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/14365ee9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/14365ee9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/14365ee9

Branch: refs/heads/develop
Commit: 14365ee9b4992078ed7403849a447e4ffd5840ec
Parents: 39a6fc4
Author: Steve Loughran <[email protected]>
Authored: Thu Feb 26 15:03:30 2015 -0800
Committer: Steve Loughran <[email protected]>
Committed: Thu Feb 26 15:03:30 2015 -0800

----------------------------------------------------------------------
 .../test/groovy/org/apache/slider/test/SliderTestUtils.groovy    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/14365ee9/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 d9d5422..288926c 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
@@ -962,8 +962,10 @@ class SliderTestUtils extends Assert {
   throws Throwable {
     try {
       ServiceLauncher launch = launch(serviceClass, conf, args);
-      fail("Expected an exception with text containing $expectedText "+
+      throw new AssertionError("Expected an exception with text containing 
$expectedText "+
                " -but the service completed with exit code 
${launch.serviceExitCode}");
+    } catch (AssertionError error) {
+      throw error;
     } catch (Throwable thrown) {
       if (expectedText && !thrown.toString().contains(expectedText)) {
         //not the right exception -rethrow

Reply via email to