Skip to content

Commit e3fce2a

Browse files
committed
Re-wording the JVM arg name for better clarity.
1 parent 4fef3c4 commit e3fce2a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

testng-core-api/src/main/java/org/testng/internal/RuntimeBehavior.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,22 @@ public final class RuntimeBehavior {
1919
public static final String TESTNG_DEFAULT_VERBOSE = "testng.default.verbose";
2020
public static final String IGNORE_CALLBACK_INVOCATION_SKIPS = "testng.ignore.callback.skip";
2121
public static final String SYMMETRIC_LISTENER_EXECUTION = "testng.listener.execution.symmetric";
22-
public static final String IDE_PACKAGE_NAMES = "testng.ide.listeners.package.name";
22+
public static final String PREFERENTIAL_LISTENERS = "testng.preferential.listeners.package";
2323

2424
private RuntimeBehavior() {}
2525

2626
public static boolean ignoreCallbackInvocationSkips() {
2727
return Boolean.getBoolean(IGNORE_CALLBACK_INVOCATION_SKIPS);
2828
}
2929

30-
public static List<String> getIdePackageNames() {
30+
/**
31+
* @return - A comma separated list of packages that represent special listeners which users will
32+
* expect to be executed after executing the regular listeners. Here special listeners can be
33+
* anything that a user feels should be executed ALWAYS at the end.
34+
*/
35+
public static List<String> getPreferentialListeners() {
3136
String packages =
32-
Optional.ofNullable(System.getProperty(IDE_PACKAGE_NAMES)).orElse("com.intellij.rt.*");
37+
Optional.ofNullable(System.getProperty(PREFERENTIAL_LISTENERS)).orElse("com.intellij.rt.*");
3338
return Arrays.asList(packages.split(","));
3439
}
3540

testng-core/src/main/java/org/testng/internal/ListenerOrderDeterminer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private ListenerOrderDeterminer() {
3030
}
3131

3232
private static final List<String> IDE_PACKAGES =
33-
RuntimeBehavior.getIdePackageNames().stream()
33+
RuntimeBehavior.getPreferentialListeners().stream()
3434
.map(each -> each.replaceAll("\\Q.*\\E", ""))
3535
.collect(Collectors.toList());
3636

0 commit comments

Comments
 (0)