diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestClassUsages.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestClassUsages.java index 61984322831c6..dc9a62dabe475 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestClassUsages.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestClassUsages.java @@ -18,13 +18,20 @@ public class TestClassUsages implements Serializable { private final Map> classNames = new HashMap<>(); + private final Map> classLevel = new HashMap<>(); public synchronized void updateTestData(String currentclass, UniqueId test, Set touched) { - classNames.put(new ClassAndMethod(currentclass, test), touched); + Set aggregate = touched; + var extra = classLevel.get(currentclass); + if (extra != null) { + aggregate.addAll(extra); + } + classNames.put(new ClassAndMethod(currentclass, test), aggregate); } public synchronized void updateTestData(String currentclass, Set touched) { classNames.put(new ClassAndMethod(currentclass, null), touched); + classLevel.put(currentclass, touched); } public synchronized void merge(TestClassUsages newData) {