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

Documentation for Micronaut test extensions #242

Merged
merged 2 commits into from
May 4, 2023
Merged

Conversation

melix
Copy link
Collaborator

@melix melix commented May 4, 2023

This commit adds user documentation for the new Micronaut Test extensions available in test resources.

This is a follow up to #231 and #241

This commit adds user documentation for the new Micronaut Test
extensions available in test resources.

This is a follow up to #231 and #241
@melix melix added this to the 2.0.0-M4 milestone May 4, 2023
@melix melix requested a review from graemerocher May 4, 2023 12:59
@melix melix self-assigned this May 4, 2023
- a test can only use single scope: it is not possible to have a test which requires multiple scopes, but nested test classes can override the scope of their parent test class
- scopes are handled _per process_ (e.g per JVM), which means that if 2 tests use the same scope but are executed on different JVMs, then the scope will be closed independently in these JVMs.

The 2d point is important to understand as the test resources service runs independently of your test suite.
Copy link
Contributor

Choose a reason for hiding this comment

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

2nd point


The 2d point is important to understand as the test resources service runs independently of your test suite.
This means in practice that if 2 tests executed in 2 different processes, then as soon as the first process has finished all tests which use that scope, the scope will be closed on the _common server_.
While test resources can recover from that situation by spawning a new test resource when the 2d process will need it, it is possible that a scope is closed _while a test is running in a different process_.
Copy link
Contributor

Choose a reason for hiding this comment

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

2nd process

@sonarcloud
Copy link

sonarcloud bot commented May 4, 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
No Duplication information No Duplication information

@melix melix merged commit ccc901c into master May 4, 2023
@melix melix deleted the cc/improvement-docs branch May 4, 2023 13:34
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.

2 participants