if(State.hasInitializationException())
{
// failed on suite level, ignore children
//notifier.fireTestIgnored(getDescription());
notifier.fireTestFailure(
new Failure(getDescription(),
new RuntimeException(
"Arquillian has previously been attempted initialized, but failed. See cause for previous exception",
State.getInitializationException())));
}
else
{
try
{
// ARQ-1742 If exceptions happen during boot
TestRunnerAdaptor adaptor = TestRunnerAdaptorBuilder.build();
// don't set it if beforeSuite fails
adaptor.beforeSuite();
State.testAdaptor(adaptor);
}
catch (Exception e)
{
// caught exception during BeforeSuite, mark this as failed
State.caughtInitializationException(e);
notifier.fireTestFailure(new Failure(getDescription(), e));
}
}
}
notifier.addListener(new RunListener()
{