testng: ensure sync on same instance (IDEA-170700)

This commit is contained in:
Anna.Kozlova
2017-03-31 10:51:32 +02:00
parent 86e7f7e92c
commit 6065be66dc
@@ -22,9 +22,11 @@ public class IDEATestNGInvokedMethodListener implements IInvokedMethodListener {
myListener = listener;
}
public synchronized void beforeInvocation(IInvokedMethod method, ITestResult testResult) {
if (!testResult.getMethod().isTest()) {
myListener.onConfigurationStart(myListener.createDelegated(testResult));
public void beforeInvocation(IInvokedMethod method, ITestResult testResult) {
synchronized (myListener) {
if (!testResult.getMethod().isTest()) {
myListener.onConfigurationStart(myListener.createDelegated(testResult));
}
}
}