Skip to content

Commit

Permalink
Merge pull request #1522 from smallrye/test/1520
Browse files Browse the repository at this point in the history
test: reproducer for issue #1520
  • Loading branch information
jponge authored Feb 21, 2024
2 parents 0708123 + deed421 commit 00b4087
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static org.awaitility.Awaitility.await;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;

import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
Expand Down Expand Up @@ -94,4 +95,17 @@ void reproducer_quarkus_21528() {

Uni.join().first(asList).withItem();
}

@Test
void reproducer_1520() {
// From https://github.com/smallrye/smallrye-mutiny/issues/1520 and
// to address https://github.com/quarkusio/quarkus/issues/34613
AtomicInteger counter = new AtomicInteger();
Multi.createFrom().iterable(List.of("aa", "bb", "cc"))
.collect().asList()
.onTermination().invoke(counter::incrementAndGet)
.onFailure().retry().withBackOff(Duration.ofSeconds(1)).atMost(2)
.await().atMost(Duration.ofSeconds(5));
assertThat(counter).hasValue(1);
}
}

0 comments on commit 00b4087

Please sign in to comment.