diff --git a/src/test/java/org/elasticsearch/test/junit/rule/RepeatOnExceptionRule.java b/src/test/java/org/elasticsearch/test/junit/rule/RepeatOnExceptionRule.java index d9acd717430..7ded36f3809 100644 --- a/src/test/java/org/elasticsearch/test/junit/rule/RepeatOnExceptionRule.java +++ b/src/test/java/org/elasticsearch/test/junit/rule/RepeatOnExceptionRule.java @@ -66,6 +66,8 @@ public class RepeatOnExceptionRule implements TestRule { if (t.getClass().equals(expectedException)) { caughtThrowable = t; logger.info("Exception [{}] occurred, rerunning the test after [{}] failures", t, t.getClass().getSimpleName(), i+1); + } else { + throw t; } } }