Skip to content

Commit

Permalink
[TEST] Initialization errors are checked before returning "no tests t…
Browse files Browse the repository at this point in the history
…o run" error

If there initialization errors and no tests to execute at the same time, better to return the initialization errors, whose check should be first then, as it might be that the "no tests to execute" is caused by the initialization errors.
  • Loading branch information
javanna committed Feb 19, 2014
1 parent 8d0f385 commit 32d85c2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,14 @@ protected List<RestTestCandidate> collectTestCandidates(Description rootDescript
}
}

if (rootDescription.getChildren().size() == 0) {
throw new InitializationError("No tests to run");
}

if (!parseExceptions.isEmpty()) {
throw new InitializationError(parseExceptions);
}

if (rootDescription.getChildren().size() == 0) {
throw new InitializationError("No tests to run");
}

return testCandidates;
}

Expand Down

0 comments on commit 32d85c2

Please sign in to comment.