Skip to content

Commit

Permalink
Add test for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
gmunozfe committed Sep 18, 2024
1 parent 7a75190 commit 0d95589
Show file tree
Hide file tree
Showing 3 changed files with 400 additions and 0 deletions.
11 changes: 11 additions & 0 deletions quarkus/addons/events/process/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-mockito</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ public void publish(DataEvent<?> event) {
public void publish(Collection<DataEvent<?>> events) {
Map<AbstractMessageEmitter, Collection<DataEvent<?>>> eventsByChannel = new HashMap<>();
for (DataEvent<?> event : events) {
if (event == null) {
continue;
}
getConsumer(event).ifPresent(c -> eventsByChannel.computeIfAbsent(c, k -> new ArrayList<>()).add(event));
}
for (Entry<AbstractMessageEmitter, Collection<DataEvent<?>>> item : eventsByChannel.entrySet()) {
Expand Down
Loading

0 comments on commit 0d95589

Please sign in to comment.