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

Reduce test pollution with spec.name and requires in http-client tests #10084

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

timyates
Copy link
Contributor

@timyates timyates commented Nov 8, 2023

In an attempt to reduce (or remove) the flakiness in PoolTimeoutSpec, I've been through the http-client tests looking for places where we were not using spec.name and Requires.

I've tried to introduce some consistency on how the tests are run, with an embedded server created at field level (shared if multiple tests) and annotated with @AutoCleanup to ensure it's closed (instead of relying on each spec method to create and close the application)

Hopefully closes #9844

Try to reduce the flakiness by using Requires and AutoCleanup to try and reduce pollution that may be occuring
@timyates timyates added the relates-to: build label for issues related to the build file or CI label Nov 8, 2023
@timyates timyates self-assigned this Nov 8, 2023
Copy link

sonarcloud bot commented Nov 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Story story = storyClient.get()

expect:
story.storyId == "ABC123"
story.title == "The Hungry Caterpillar"
}

@Issue('https://github.com/micronaut-projects/micronaut-core/issues/6717')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method should stay next to the classes it uses

Copy link
Member

@yawkat yawkat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not a big fan of moving the context to class level, i've had issues with interference between test methods before.

@sdelamo sdelamo merged commit 1817df1 into 4.1.x Nov 8, 2023
10 checks passed
@sdelamo sdelamo deleted the pool-timeout-flakiness branch November 8, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relates-to: build label for issues related to the build file or CI
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants