Skip to content
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

Fix wrongly ordered assertThat#withFailMessage not showing #88

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

mohamedibrahim54
Copy link
Contributor

Hi,
in Part11BlockingToReactiveTest.slowPublisherFastSubscriber method: withFailMessage is ignored and no fail message will be show.
assertThat(repository.getCallCount()).isEqualTo(0).withFailMessage("The call to findAll must be deferred until the flux is subscribed");
To test that modify Part11BlockingToReactive.blockingRepositoryToFlux mothod as following:
return Flux.fromIterable(repository.findAll());
the test will failed but fail message is not displayed.
after small change, it is fixed:
assertThat(repository.getCallCount()) .withFailMessage("The call to findAll must be deferred until the flux is subscribed") .isEqualTo(0);
now the fail message is displayed if the assert is false.
hope my request is useful.
Thanks.

@simonbasle
Copy link
Contributor

@mohamedibrahim54 yeah that makes sense, thank you!

@simonbasle simonbasle changed the title fix ignore withFailMessage in assertThat - show fail message Fix wrongly ordered assertThat#withFailMessage not showing Feb 23, 2022
@simonbasle simonbasle merged commit dd0c42b into reactor:master Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants