Add isCompletedWithValueMatchingWithin to CompletableFuture assertions#3506
Add isCompletedWithValueMatchingWithin to CompletableFuture assertions#3506mipo256 wants to merge 1 commit intoassertj:3.xfrom
isCompletedWithValueMatchingWithin to CompletableFuture assertions#3506Conversation
|
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.