-
Notifications
You must be signed in to change notification settings - Fork 566
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
Use Hamcrest assertions instead of JUnit in common/reactive (#1749) #4908
Use Hamcrest assertions instead of JUnit in common/reactive (#1749) #4908
Conversation
@@ -98,7 +99,7 @@ public void onComplete() { | |||
} catch (InterruptedException e) { | |||
executorService.shutdownNow(); | |||
} | |||
assertFalse(errorFound.isPresent(), () -> errorFound.get()); | |||
assertThat(errorFound.orElse(""), errorFound.isPresent(), is(false)); |
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.
I don't like this approach with Optional
, but if you need the error message...
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.
For Helidon 4 (main
branch), we do have an optional matcher. For this version, we can keep this.
Alternative:
assertThat(errorFound, is(Optional.empty()));
/oca-checked |
/trigger |
@@ -98,7 +99,7 @@ public void onComplete() { | |||
} catch (InterruptedException e) { | |||
executorService.shutdownNow(); | |||
} | |||
assertFalse(errorFound.isPresent(), () -> errorFound.get()); | |||
assertThat(errorFound.orElse(""), errorFound.isPresent(), is(false)); |
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.
For Helidon 4 (main
branch), we do have an optional matcher. For this version, we can keep this.
Alternative:
assertThat(errorFound, is(Optional.empty()));
Part of #1749
I'll do backport into helidon-2.x after merge.
I've already signed OCA. It's an automation problem.
I followed these instructions