[junit]: IDEA-386776 IJ-CR-195055 JUnit version detection with customizable scope via registry key

(cherry picked from commit c5e5fd5388f1eea72def08677174af1809603a17)

IJ-CR-195055

GitOrigin-RevId: 55c55179321b769b876df4141fbe747997355360
This commit is contained in:
Aleksey Dobrynin
2026-03-16 11:19:22 +00:00
committed by intellij-monorepo-bot
parent 577faf357d
commit 229e495b63
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -161,8 +161,8 @@
defaultValue="600"
description="Timeout in seconds for the test runner to terminate gracefully after receiving a shutdown signal. A negative value disables the timeout, allowing unlimited wait."/>
<registryKey key="junit.version.detection.scope"
defaultValue="withDependenciesAndLibraries"
description="Scope used to detect the JUnit version in a module. Supported values: 'runtime' (module runtime), 'module' (module only), 'testsWithDependents' (tests with dependent modules), 'WithLibraries' (module with libraries), and 'withDependenciesAndLibraries' (module with dependencies and libraries; used by default)."/>
defaultValue="[runtime|module|testsWithDependents|withLibraries|withDependenciesAndLibraries*]"
description="Scope used to detect the JUnit version in a module."/>
</extensions>
<extensionPoints>
@@ -645,7 +645,7 @@ public abstract class TestObject extends JavaTestFrameworkRunnableState<JUnitCon
case "runtime" -> GlobalSearchScope.moduleRuntimeScope(module, true);
case "module" -> GlobalSearchScope.moduleScope(module);
case "testsWithDependents" -> GlobalSearchScope.moduleTestsWithDependentsScope(module);
case "WithLibraries" -> GlobalSearchScope.moduleWithLibrariesScope(module);
case "withLibraries" -> GlobalSearchScope.moduleWithLibrariesScope(module);
default -> GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module, true);
};
}