-
-
Notifications
You must be signed in to change notification settings - Fork 766
Add isCompletedWithValueMatchingWithin to CompletableFuture assertions
#3506
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
Conversation
|
Thanks @mipo256, we will review your PR shortly ! |
|
@mipo256 the code does not compile on java 8 which is AssertJ Core 3.x baseline, can you fix it ? FYI we will bump it to java 17 for 4.x |
|
Hey @joel-costigliola, of course, I can fix it to run on JDK 8. Will do it today. P.SL In contribution guidelines it is mentioned that the project needs to be built with JDK 17 |
|
We actually raised it to 21 for building it 🙃 but the language syntax and feature set that can be used in the code are still restricted to 8 |
72e5f56 to
ff8ab54
Compare
…od with the value that satisfies condition
ff8ab54 to
59bbca7
Compare
|
Thanks. guys, I've fixed it. Now the build should run just fine. FYI: @joel-costigliola, @scordio |
|
Hey @joel-costigliola, any news on reviewing this PR? |
|
@mipo256 thanks for the reminder, we'll include this issue in our next release. |
|
LGTM, I'm integrating it but will rename the assertion to ex: assertThat(completedFuture("something")).isCompletedWithValueMatchingWithin(result -> result.equals("something"),
Duration.ofSeconds(10)); |
|
Integrated thanks @mipo256 ! |
Okay, fine, thanks!) |
|
You'll get the full credit for it anyway ;-) |
isCompletedWithValueMatchingWithin to CompletableFuture assertions
… a given period and a value that satisfies a predicate Fix assertj#3506
Added a new
willCompleteWithValueMatchingmethod toAbstractCompletableFutureAssertto check thatCompletableFuturewill complete within the given period with value matching givenPredicate. Found this kind of assertion very handy in my project.