Skip to content

Commit

Permalink
test: reproducer for issue #1520
Browse files Browse the repository at this point in the history
  • Loading branch information
jponge committed Feb 21, 2024
1 parent 0708123 commit deed421
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 deed421

Please sign in to comment.