Package org.apache.pulsar.tests
Class FailFastNotifier
java.lang.Object
org.apache.pulsar.tests.FailFastNotifier
- All Implemented Interfaces:
org.testng.IInvokedMethodListener,org.testng.ITestListener,org.testng.ITestNGListener
public class FailFastNotifier
extends Object
implements org.testng.IInvokedMethodListener, org.testng.ITestListener
Notifies TestNG core skipping remaining tests after first failure has appeared.
Enabled when -DtestFailFast=true
This is a workaround for https://issues.apache.org/jira/browse/SUREFIRE-1762 since
the bug makes the built-in fast-fast feature `-Dsurefire.skipAfterFailureCount=1` unusable.
Maven Surefire version 3.0.0-M5 contains the fix, but that version is unusable because of problems
with test output, https://issues.apache.org/jira/browse/SUREFIRE-1827.
It makes the Pulsar integration tests slow and to fail.
This implementation is based on org.apache.maven.surefire.testng.utils.FailFastNotifier
implementation that is part of the Maven Surefire plugin.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterInvocation(org.testng.IInvokedMethod iInvokedMethod, org.testng.ITestResult iTestResult) voidbeforeInvocation(org.testng.IInvokedMethod iInvokedMethod, org.testng.ITestResult iTestResult) voidonTestFailure(org.testng.ITestResult result) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testng.IInvokedMethodListener
afterInvocation, beforeInvocationMethods inherited from interface org.testng.ITestListener
onFinish, onStart, onTestFailedButWithinSuccessPercentage, onTestFailedWithTimeout, onTestSkipped, onTestStart, onTestSuccess
-
Constructor Details
-
FailFastNotifier
public FailFastNotifier()
-
-
Method Details
-
onTestFailure
public void onTestFailure(org.testng.ITestResult result) - Specified by:
onTestFailurein interfaceorg.testng.ITestListener
-
beforeInvocation
public void beforeInvocation(org.testng.IInvokedMethod iInvokedMethod, org.testng.ITestResult iTestResult) - Specified by:
beforeInvocationin interfaceorg.testng.IInvokedMethodListener
-
afterInvocation
public void afterInvocation(org.testng.IInvokedMethod iInvokedMethod, org.testng.ITestResult iTestResult) - Specified by:
afterInvocationin interfaceorg.testng.IInvokedMethodListener
-