-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance testing utilities #494
Conversation
…ave a message (such as an NPE or a TimeoutException)
Also refactor the internal of the class to prepare for the "await" methods
* awaitNextItem and awaitNextItems * awaitFailure * awaitCompletion * getLastItem * assertLastItem
* awaitItem * awaitFailure * awaitSubscription
Oh there's an issue in |
It means the assertions are working :-) More seriously, there is a race. When the source started to emit items, you can't really awaitNextItems as it may have already received some. We may need to introduce another assertion, awaiting for a total number of items is received (but should it be strict or anything greater would be ok). |
Codecov Report
@@ Coverage Diff @@
## main #494 +/- ##
============================================
+ Coverage 89.95% 90.11% +0.16%
- Complexity 2931 3005 +74
============================================
Files 382 382
Lines 11340 11577 +237
Branches 1420 1446 +26
============================================
+ Hits 10201 10433 +232
- Misses 578 581 +3
- Partials 561 563 +2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See typo, otherwise a great PR!
implementation/src/main/java/io/smallrye/mutiny/helpers/test/AssertSubscriber.java
Outdated
Show resolved
Hide resolved
…ssertSubscriber.java
Fix #465
The PR adds:
in
UniAssertSubscriber
:awaitItem
- with and without durationawaitFailure
- with and without duration and validation of the failureawaitSubscription
- with or without durationin
AssertSubscriber
:awaitCompletion
- with and without durationawaitFailure
- with and without duration and validation of the failureawaitNextItems
andawaitNextItem
awaitSubscription
- with or without durationassertLastItem
andgetLastItem