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

UniAsserter - ignore the assertFailedWith() if a previous stage fails #29633

Merged
merged 1 commit into from
Dec 2, 2022

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Dec 2, 2022

@geoand
Copy link
Contributor

geoand commented Dec 2, 2022

I am not sure I understand what this does exactly. Can you elaborate?

@mkouba
Copy link
Contributor Author

mkouba commented Dec 2, 2022

I am not sure I understand what this does exactly. Can you elaborate?

I can try ;-). So previously we transformed the previous Uni (U1) to a new Uni provided by the supplier (U2) and then transformed the Uni based on the logic in the onItemOrFailure() callback into U3. I.e. U1 -> U2 -> (onItemOrFailure() + assert) -> U3. As a a result, when U1 failed we received the exception in the (onItemOrFailure() + assert) part.

After this change, we do something like U1 -> (U2 -> (onItemOrFailure() + assert) -> U3). And so if U1 fails then the (onItemOrFailure() + assert) part is not invoked at all.

Does it make any sense? I'm still not very sure when it comes to Mutiny but at least the tests don't fail :D

@geoand
Copy link
Contributor

geoand commented Dec 2, 2022

Thanks for the explanation.

I think it makes sense.

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 2, 2022

Failing Jobs - Building 53795e7

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
✔️ JVM Tests - JDK 17
JVM Tests - JDK 17 MacOS M1 Set up runner ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 18

@geoand geoand merged commit abee5fb into quarkusio:main Dec 2, 2022
@quarkus-bot quarkus-bot bot added this to the 2.16 - main milestone Dec 2, 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.

UniAsserter - assertFailedWith() does not always assert the failure from the supplied Uni
2 participants