Fixtures for the OS, JRE, system property, environment variable and EnabledIf conditions plus a custom ExecutionCondition, run through the JUnit Platform launcher (in-process and in child JVMs) to capture real skip reasons; skipped versus aborted lifecycle; stacking, class-level skips and the deactivate switch; the 2025 article's code compiled as published; and a javap comparison of the condition package in 5.14.4 and 6.1.3. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01G8ikz8xdWuTP5yun8DZ1hk
19 lines
963 B
Plaintext
19 lines
963 B
Plaintext
This machine: os.name=Linux, os.arch=amd64, java.version=25.0.4.1
|
|
OS.current()=LINUX, JRE.currentVersion()=JAVA_25
|
|
|
|
StackingConditionalTest
|
|
bothConditionsFalse() : SKIPPED (Disabled on operating system: Linux)
|
|
methodConditionDefaultReason() : SKIPPED (@EnabledIf("alwaysFalse") evaluated to false)
|
|
methodConditionOwnReason() : SKIPPED (feature flag is off)
|
|
onlySecondConditionFalse() : SKIPPED (System property [never.set] does not exist)
|
|
withOwnReason() : SKIPPED (Disabled on operating system: Linux ==> Needs the Windows registry)
|
|
|
|
ClassLevelConditionalTest (@EnabledOnOs(WINDOWS) on the class, two test methods)
|
|
ClassLevelConditionalTest : CONTAINER SKIPPED (Disabled on operating system: Linux)
|
|
|
|
OsConditionalTest again, with the configuration parameter
|
|
junit.jupiter.conditions.deactivate=org.junit.jupiter.api.condition.*
|
|
runEverywhereButSolaris() : PASSED
|
|
testUnixSocketBehavior() : PASSED
|
|
testWindowsRegistryAccess() : PASSED
|