mirror of
https://github.com/sbt/sbt.git
synced 2026-09-04 08:45:56 +02:00
Fix #5801: Remove duplicate TaskDefs in test agent
When forking, a test could be run as many times as its `TestDef` matched `Fingerprint`s. When forking is disabled, sbt correctly runs the tests only once.
This commit is contained in:
@@ -19,6 +19,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
public final class ForkMain {
|
||||
@@ -326,7 +327,7 @@ public final class ForkMain {
|
||||
|
||||
if (framework == null) continue;
|
||||
|
||||
final ArrayList<TaskDef> filteredTests = new ArrayList<>();
|
||||
final LinkedHashSet<TaskDef> filteredTests = new LinkedHashSet<>();
|
||||
for (final Fingerprint testFingerprint : framework.fingerprints()) {
|
||||
for (final TaskDef test : tests) {
|
||||
// TODO: To pass in correct explicitlySpecified and selectors
|
||||
|
||||
Reference in New Issue
Block a user