From 56f4fcb5df4067a17fdc0c5d61b342825c8a445f Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Tue, 4 Feb 2014 13:05:18 +0100 Subject: [PATCH] [TEST] thrown error when there are no REST tests to run --- .../elasticsearch/test/rest/junit/RestTestSuiteRunner.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/org/elasticsearch/test/rest/junit/RestTestSuiteRunner.java b/src/test/java/org/elasticsearch/test/rest/junit/RestTestSuiteRunner.java index 61cabe6ccd7..a3321b44c97 100644 --- a/src/test/java/org/elasticsearch/test/rest/junit/RestTestSuiteRunner.java +++ b/src/test/java/org/elasticsearch/test/rest/junit/RestTestSuiteRunner.java @@ -336,6 +336,10 @@ public class RestTestSuiteRunner extends ParentRunner { } } + if (rootDescription.getChildren().size() == 0) { + throw new InitializationError("No tests to run"); + } + if (!parseExceptions.isEmpty()) { throw new InitializationError(parseExceptions); }