Skip to content

JUnit 5 test extensions can lose track of storage #744

@eeverman

Description

@eeverman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions