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

3.x - Slightly relax a unit test to avoid test ordering issues #8139

Merged

Conversation

tjquinno
Copy link
Member

Description

Resolves #8123

The purpose of the test is to make sure that a metric is registered and updated via a stereotype annotation which itself bears metrics annotations.

The counter value associated with the simple timer in the failing test can be updated multiple times during the course of all units tests (because it is on a bean).

The change in the PR slightly relaxes the test to make sure the simple timer's counter is AT LEAST 1 instead of exactly 1. If it is non-zero then clearly the meter was, in fact, registered and updated, satisfying the purpose of the test.

Documentation

Test bug fix. No doc impact.

…T LEAST once instead of exactly once to avoid test ordering issues
@tjquinno tjquinno requested a review from barchetta December 11, 2023 23:42
@tjquinno tjquinno self-assigned this Dec 11, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 11, 2023
@tjquinno tjquinno changed the title Slightly relax a unit test to avoid test ordering issues 3.x - Slightly relax a unit test to avoid test ordering issues Dec 11, 2023
@tjquinno tjquinno merged commit 4f2f32b into helidon-io:helidon-3.x Dec 12, 2023
@tjquinno tjquinno deleted the 3.x-metrics-stereotype-test-fix branch December 12, 2023 00:20
@barchetta barchetta linked an issue Dec 12, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.x: TestStereotypes.testMethodLevelStereotype test failure
2 participants