Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks around accessing SuiteResult #3099

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions testng-core/src/main/java/org/testng/SuiteRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public class SuiteRunner implements ISuite, ISuiteRunnerListener {

private static final String DEFAULT_OUTPUT_DIR = "test-output";

private final Map<String, ISuiteResult> suiteResults =
Collections.synchronizedMap(Maps.newLinkedHashMap());
private final Map<String, ISuiteResult> suiteResults = Maps.newLinkedHashMap();
private final List<TestRunner> testRunners = Lists.newArrayList();
private final Map<Class<? extends ISuiteListener>, ISuiteListener> listeners =
Maps.newLinkedHashMap();
Expand Down Expand Up @@ -514,7 +513,9 @@ public String getOutputDirectory() {

@Override
public Map<String, ISuiteResult> getResults() {
return suiteResults;
// Just to ensure that we guard the internals of the suite results we now wrap it
// around with an unmodifiable map.
return Collections.unmodifiableMap(suiteResults);
}

/**
Expand Down
Loading