use of io.strimzi.systemtest.parallel.SuiteThreadController in project strimzi by strimzi.
the class TestExecutionWatcher method handleAfterAllMethodExecutionException.
@Override
public void handleAfterAllMethodExecutionException(ExtensionContext extensionContext, Throwable throwable) throws Throwable {
LOGGER.error("{} - Exception {} has been thrown in @AfterAll. Going to collect logs from components.", extensionContext.getRequiredTestClass().getSimpleName(), throwable.getMessage());
final String testClass = extensionContext.getRequiredTestClass().getName();
SuiteThreadController suiteThreadController = SuiteThreadController.getInstance();
if (StUtils.isParallelSuite(extensionContext)) {
suiteThreadController.removeParallelSuite(extensionContext);
}
if (StUtils.isIsolatedSuite(extensionContext)) {
suiteThreadController.unLockIsolatedSuite();
}
collectLogs(extensionContext, new CollectorElement(testClass));
throw throwable;
}
use of io.strimzi.systemtest.parallel.SuiteThreadController in project strimzi-kafka-operator by strimzi.
the class TestExecutionWatcher method handleAfterAllMethodExecutionException.
@Override
public void handleAfterAllMethodExecutionException(ExtensionContext extensionContext, Throwable throwable) throws Throwable {
LOGGER.error("{} - Exception {} has been thrown in @AfterAll. Going to collect logs from components.", extensionContext.getRequiredTestClass().getSimpleName(), throwable.getMessage());
final String testClass = extensionContext.getRequiredTestClass().getName();
SuiteThreadController suiteThreadController = SuiteThreadController.getInstance();
if (StUtils.isParallelSuite(extensionContext)) {
suiteThreadController.removeParallelSuite(extensionContext);
}
if (StUtils.isIsolatedSuite(extensionContext)) {
suiteThreadController.unLockIsolatedSuite();
}
collectLogs(extensionContext, new CollectorElement(testClass));
throw throwable;
}
Aggregations