eclipse / microprofile-reactive-messaging

Apache License 2.0
60 stars 37 forks source link

Wrong assertion in `ThrowExceptionOverflowStrategyOverflowTest` #145

Closed danielkec closed 2 years ago

danielkec commented 2 years ago

ThrowExceptionOverflowStrategyOverflowTest assert that result contains 1 - assertThat(bean.accepted()).contains("1");

https://github.com/eclipse/microprofile-reactive-messaging/blob/aff8ae8b8669fb7d02351233a6afdfe2eed0c9b9/tck/src/main/java/org/eclipse/microprofile/reactive/messaging/tck/channel/overflow/ThrowExceptionOverflowStrategyOverflowTest.java#L45-L50

But test scenario emits items starting with zero 0,1,2,3,4... https://github.com/eclipse/microprofile-reactive-messaging/blob/aff8ae8b8669fb7d02351233a6afdfe2eed0c9b9/tck/src/main/java/org/eclipse/microprofile/reactive/messaging/tck/channel/overflow/BeanUsingThrowExceptionStrategy.java#L80-L84

This can work only for reactive streams implementations with flatMapCompletionStage operators prefetch higher than 1