eeverman / eeverman/andhow

JUnit 5 test extensions can lose track of storage

Open
#744 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
25
Forks
34
PR merge metrics
No merged PRs in 30d

Description

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:

https://github.com/eeverman/andhow/blob/d632675b561331e1aa3fd6033e68edb87b818b57/andhow-junit5-extensions/src/main/java/org/yarnandtail/andhow/junit5/ext/ExtensionBase.java#L23

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.