diff --git a/implementation/src/main/java/io/smallrye/mutiny/helpers/test/AssertSubscriber.java b/implementation/src/main/java/io/smallrye/mutiny/helpers/test/AssertSubscriber.java index 125bebb5c..f5b047976 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/helpers/test/AssertSubscriber.java +++ b/implementation/src/main/java/io/smallrye/mutiny/helpers/test/AssertSubscriber.java @@ -5,8 +5,6 @@ import static java.time.Duration.ofSeconds; import java.time.Duration; -import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.NoSuchElementException; import java.util.concurrent.*; @@ -67,7 +65,7 @@ public class AssertSubscriber implements MultiSubscriber, ContextSupport { /** * The received items. */ - private final List items = Collections.synchronizedList(new ArrayList<>()); + private final List items = new CopyOnWriteArrayList<>(); /** * The received failure.