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

JUnit 5 test extensions can lose track of storage #744

Open
eeverman opened this issue Nov 9, 2022 · 0 comments
Open

JUnit 5 test extensions can lose track of storage #744

eeverman opened this issue Nov 9, 2022 · 0 comments
Labels
Milestone

Comments

@eeverman
Copy link
Owner

eeverman commented Nov 9, 2022

When JUnit 5 test extensions store state into JUnit context storage at the test level (as opposed to method level), they use the class as a key rather than the class instance:

return context.getStore(ExtensionContext.Namespace.create(getClass(), context.getRequiredTestClass()));

Multithreaded tests could easily lose track of storage. This is more of a theoretical issue, since AndHow cannot really support parallelized testing due to the singleton model.

Might also rename the accessor methods getPerTestInstanceNamespace.

@eeverman eeverman added the bug label Nov 9, 2022
@eeverman eeverman added this to the 1.5.1 milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant