Skip to content

Allow configuring useTestClassScopedExtensionContext via spring.properties #36460

@ahrytsiuk

Description

@ahrytsiuk

After upgrading to Spring Framework 7 we noticed tests failures when using @Nested annotation. Adding @SpringExtensionConfig(useTestClassScopedExtensionContext = true) fixes the problem.
I'm aware that this issue was discussed in multiple threads like #31456, #35880 and others.

However that task to add this annotation to fix tests on a big code base is a bit tedious.

Would it be possible to introduce a configuration parameter via spring.properties, similar to a new property in Spring 7.x spring.test.context.cache.pause? So we can configure this property globally without the need to modify many tests.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions