Search in sources :

Example 26 with AssumptionViolatedException

use of org.junit.internal.AssumptionViolatedException in project sling by apache.

the class SlingRemoteTestRunner method runChild.

@Override
protected void runChild(SlingRemoteTest t, RunNotifier notifier) {
    try {
        maybeExecuteTests();
    } catch (Exception e) {
        throw new Error(e);
    }
    EachTestNotifier eachNotifier = new EachTestNotifier(notifier, t.describe());
    eachNotifier.fireTestStarted();
    try {
        log.debug("Running test {}", t.describe());
        t.run();
    } catch (AssumptionViolatedException e) {
        eachNotifier.addFailedAssumption(e);
    } catch (Throwable e) {
        eachNotifier.addFailure(e);
    } finally {
        eachNotifier.fireTestFinished();
    }
}
Also used : AssumptionViolatedException(org.junit.internal.AssumptionViolatedException) EachTestNotifier(org.junit.internal.runners.model.EachTestNotifier) InitializationError(org.junit.runners.model.InitializationError) MultipleFailureException(org.junit.internal.runners.model.MultipleFailureException) AssumptionViolatedException(org.junit.internal.AssumptionViolatedException)

Aggregations

AssumptionViolatedException (org.junit.internal.AssumptionViolatedException)26 Test (org.junit.Test)7 Statement (org.junit.runners.model.Statement)6 EachTestNotifier (org.junit.internal.runners.model.EachTestNotifier)4 Failure (org.junit.runner.notification.Failure)4 URI (java.net.URI)3 Description (org.junit.runner.Description)3 MultipleFailureException (org.junit.runners.model.MultipleFailureException)3 FileStatus (org.apache.hadoop.fs.FileStatus)2 Path (org.apache.hadoop.fs.Path)2 SuppressForbidden (com.carrotsearch.randomizedtesting.annotations.SuppressForbidden)1 BufferedReader (java.io.BufferedReader)1 FileInputStream (java.io.FileInputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 PrintWriter (java.io.PrintWriter)1 Reader (java.io.Reader)1 ArrayList (java.util.ArrayList)1 Locale (java.util.Locale)1