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

Use Hamcrest assertions instead of JUnit in common/reactive (#1749) #4908

Merged
merged 1 commit into from
Sep 23, 2022

Conversation

Captain1653
Copy link
Contributor

@Captain1653 Captain1653 commented Sep 17, 2022

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

@@ -98,7 +99,7 @@ public void onComplete() {
} catch (InterruptedException e) {
executorService.shutdownNow();
}
assertFalse(errorFound.isPresent(), () -> errorFound.get());
assertThat(errorFound.orElse(""), errorFound.isPresent(), is(false));
Copy link
Contributor Author

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...

Copy link
Member

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()));

@romain-grecourt
Copy link
Contributor

/oca-checked

@romain-grecourt
Copy link
Contributor

/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));
Copy link
Member

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()));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants