mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testng: fire configuration started if configuration listener is available
This commit is contained in:
@@ -86,17 +86,16 @@ public class IDEARemoteTestNG extends TestNG {
|
||||
addListener((Object)new IDEATestNGSuiteListener(listener));
|
||||
addListener((Object)new IDEATestNGTestListener(listener));
|
||||
try {
|
||||
Class<?> aClass = Class.forName("org.testng.IDEATestNGInvokedMethodListener");
|
||||
Object invokedMethodListener = aClass.getConstructor(new Class[]{IDEATestNGRemoteListener.class}).newInstance(listener);
|
||||
addListener((Object)invokedMethodListener);
|
||||
}
|
||||
catch (Throwable ignore){}
|
||||
|
||||
try {
|
||||
Class<?> aClass = Class.forName("org.testng.IDEATestNGConfigurationListener");
|
||||
Object configurationListener = aClass.getConstructor(new Class[] {IDEATestNGRemoteListener.class}).newInstance(listener);
|
||||
Class<?> configClass = Class.forName("org.testng.IDEATestNGConfigurationListener");
|
||||
Object configurationListener = configClass.getConstructor(new Class[] {IDEATestNGRemoteListener.class}).newInstance(listener);
|
||||
addListener((Object)configurationListener);
|
||||
aClass.getMethod("setIgnoreStarted").invoke(configurationListener);
|
||||
|
||||
Class<?> invokeClass = Class.forName("org.testng.IDEATestNGInvokedMethodListener");
|
||||
Object invokedMethodListener = invokeClass.getConstructor(new Class[]{IDEATestNGRemoteListener.class}).newInstance(listener);
|
||||
addListener((Object)invokedMethodListener);
|
||||
|
||||
//start with configuration started if invoke method listener was not added, otherwise with
|
||||
configClass.getMethod("setIgnoreStarted").invoke(configurationListener);
|
||||
}
|
||||
catch (Throwable ignored) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user