Skip to content

Reproduce System properties not restored after ParameterizedTest#5718

Draft
nielsbasjes wants to merge 1 commit into
junit-team:mainfrom
nielsbasjes:TestRestoreSystemProps
Draft

Reproduce System properties not restored after ParameterizedTest#5718
nielsbasjes wants to merge 1 commit into
junit-team:mainfrom
nielsbasjes:TestRestoreSystemProps

Conversation

@nielsbasjes
Copy link
Copy Markdown

@nielsbasjes nielsbasjes commented Jun 1, 2026

This is just a few tests to reproduce #5717

Because this does not yet fix the issue this currently will always fail the build.


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

Signed-off-by: Niels Basjes <niels@basjes.nl>
@nielsbasjes nielsbasjes force-pushed the TestRestoreSystemProps branch from 524ac19 to 5d8023c Compare June 1, 2026 08:03
@mpkorstanje mpkorstanje changed the title test: Reproduce System properties not restored after ParameterizedTest Reproduce System properties not restored after ParameterizedTest Jun 1, 2026
@testlens-app
Copy link
Copy Markdown

testlens-app Bot commented Jun 1, 2026

🚨 TestLens detected 8 failed tests 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

Check Project/Task Test Runs
CI / Build / Linux :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest 🚫 ❌
CI / Build / Linux :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest > testNormal() 🚫 ⚠️
CI / Build / Windows :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest 🚫 ❌
CI / Build / Windows :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest > testNormal() 🚫 ⚠️
CI / Build / macOS :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest 🚫 ❌
CI / Build / macOS :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest > testNormal() 🚫 ⚠️
CI / Cross-Version / OpenJ9 25 :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest 🚫 ❌
CI / Cross-Version / OpenJ9 25 :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest > testNormal() 🚫 ⚠️
CI / Cross-Version / OpenJDK 26 (ga) :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest 🚫 ❌
CI / Cross-Version / OpenJDK 26 (ga) :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest > testNormal() 🚫 ⚠️
CI / Cross-Version / OpenJDK 26 (leyden) :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest 🚫 ❌
CI / Cross-Version / OpenJDK 26 (leyden) :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest > testNormal() 🚫 ⚠️
CI / Cross-Version / OpenJDK 27 (ea) :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest 🚫 ❌
CI / Cross-Version / OpenJDK 27 (ea) :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest > testNormal() 🚫 ⚠️
CI / Cross-Version / OpenJDK 27 (valhalla) :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest 🚫 ❌
CI / Cross-Version / OpenJDK 27 (valhalla) :jupiter-tests:test System Properties Extension > properties are restored after ParameterizedTest > testNormal() 🚫 ⚠️

🏷️ Commit: 5d8023c
▶️ Tests: 26166 executed
⚪️ Checks: 16/16 completed

Test Failures (first 10 of 40)

System Properties Extension > properties are restored after ParameterizedTest (:jupiter-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: [System property "ParameterizedTest PROP Variable" should be "Original Value".] 
expected: "Original Value"
 but was: "Changed Value"
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.assertSystemProperty(SystemPropertiesExtensionTests.java:715)
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.finish(SystemPropertiesExtensionTests.java:736)
expected actual
"Original Value" "Changed Value"
System Properties Extension > properties are restored after ParameterizedTest (:jupiter-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: [System property "ParameterizedTest PROP Variable" should be "Original Value".] 
expected: "Original Value"
 but was: "Changed Value"
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.assertSystemProperty(SystemPropertiesExtensionTests.java:715)
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.finish(SystemPropertiesExtensionTests.java:736)
expected actual
"Original Value" "Changed Value"
System Properties Extension > properties are restored after ParameterizedTest (:jupiter-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: [System property "ParameterizedTest PROP Variable" should be "Original Value".] 
expected: "Original Value"
 but was: "Changed Value"
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.assertSystemProperty(SystemPropertiesExtensionTests.java:715)
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.finish(SystemPropertiesExtensionTests.java:736)
expected actual
"Original Value" "Changed Value"
System Properties Extension > properties are restored after ParameterizedTest > testNormal() (:jupiter-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: [System property "ParameterizedTest PROP Variable" should be "Original Value".] 
expected: "Original Value"
 but was: "Changed Value"
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.assertSystemProperty(SystemPropertiesExtensionTests.java:715)
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.testNormal(SystemPropertiesExtensionTests.java:752)
expected actual
"Original Value" "Changed Value"
System Properties Extension > properties are restored after ParameterizedTest > testNormal() (:jupiter-tests:test in CI / Build / Linux)
org.opentest4j.AssertionFailedError: [System property "ParameterizedTest PROP Variable" should be "Original Value".] 
expected: "Original Value"
 but was: "Changed Value"
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.assertSystemProperty(SystemPropertiesExtensionTests.java:715)
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.testNormal(SystemPropertiesExtensionTests.java:752)
expected actual
"Original Value" "Changed Value"
System Properties Extension > properties are restored after ParameterizedTest (:jupiter-tests:test in CI / Build / Windows)
org.opentest4j.AssertionFailedError: [System property "ParameterizedTest PROP Variable" should be "Original Value".] 
expected: "Original Value"
 but was: "Changed Value"
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.assertSystemProperty(SystemPropertiesExtensionTests.java:715)
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.finish(SystemPropertiesExtensionTests.java:736)
expected actual
"Original Value" "Changed Value"
System Properties Extension > properties are restored after ParameterizedTest (:jupiter-tests:test in CI / Build / Windows)
org.opentest4j.AssertionFailedError: [System property "ParameterizedTest PROP Variable" should be "Original Value".] 
expected: "Original Value"
 but was: "Changed Value"
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.assertSystemProperty(SystemPropertiesExtensionTests.java:715)
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.finish(SystemPropertiesExtensionTests.java:736)
expected actual
"Original Value" "Changed Value"
System Properties Extension > properties are restored after ParameterizedTest (:jupiter-tests:test in CI / Build / Windows)
org.opentest4j.AssertionFailedError: [System property "ParameterizedTest PROP Variable" should be "Original Value".] 
expected: "Original Value"
 but was: "Changed Value"
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.assertSystemProperty(SystemPropertiesExtensionTests.java:715)
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.finish(SystemPropertiesExtensionTests.java:736)
expected actual
"Original Value" "Changed Value"
System Properties Extension > properties are restored after ParameterizedTest > testNormal() (:jupiter-tests:test in CI / Build / Windows)
org.opentest4j.AssertionFailedError: [System property "ParameterizedTest PROP Variable" should be "Original Value".] 
expected: "Original Value"
 but was: "Changed Value"
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.assertSystemProperty(SystemPropertiesExtensionTests.java:715)
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.testNormal(SystemPropertiesExtensionTests.java:752)
expected actual
"Original Value" "Changed Value"
System Properties Extension > properties are restored after ParameterizedTest > testNormal() (:jupiter-tests:test in CI / Build / Windows)
org.opentest4j.AssertionFailedError: [System property "ParameterizedTest PROP Variable" should be "Original Value".] 
expected: "Original Value"
 but was: "Changed Value"
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.assertSystemProperty(SystemPropertiesExtensionTests.java:715)
	at org.junit.jupiter.api.util.SystemPropertiesExtensionTests$RestoreAfterParameterizedTest.testNormal(SystemPropertiesExtensionTests.java:752)
expected actual
"Original Value" "Changed Value"

Muted Tests

Select tests to mute in this pull request:

  • System Properties Extension > properties are restored after ParameterizedTest
  • System Properties Extension > properties are restored after ParameterizedTest > testNormal()

Reuse successful test results:

  • ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app.

@mpkorstanje
Copy link
Copy Markdown
Member

Cheers! Very helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants