Skip to content

Commit

Permalink
[Fix apache#2070] Synchronizing TestEventPublisher
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado committed Jun 17, 2024
1 parent 4078795 commit 8f5873d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CountDownLatch;

Expand All @@ -35,11 +36,11 @@ public class TestEventPublisher implements EventPublisher {
private CountDownLatch latch;

public List<DataEvent<?>> getEvents() {
return events;
return Collections.unmodifiableList(events);
}

public TestEventPublisher() {
events = new ArrayList<>();
events = Collections.synchronizedList(new ArrayList<>());
}

@Override
Expand All @@ -56,6 +57,7 @@ public void publish(Collection<DataEvent<?>> events) {

public void setLatch(CountDownLatch latch) {
this.latch = latch;
events.clear();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
quarkus.devservices.enabled=false

0 comments on commit 8f5873d

Please sign in to comment.