Skip to content

Commit

Permalink
Disable environment variable tests on Java 17+ (#534 / #535)
Browse files Browse the repository at this point in the history
The environment variable extension / the code under test uses
reflective access to change otherwise immutable environment
variables. On Java 17+, this leads to an
`InaccessibleObjectException`.

See also: #509

Closes: #534
PR: #535
  • Loading branch information
beatngu13 committed Nov 11, 2021
1 parent 5bac897 commit e669c33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.api.extension.ExtensionConfigurationException;
import org.junitpioneer.testkit.ExecutionResults;

@EnabledForJreRange(max = JRE.JAVA_16, disabledReason = "See: https://github.com/junit-pioneer/junit-pioneer/issues/509")
@DisplayName("EnvironmentVariable extension")
class EnvironmentVariableExtensionTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.JRE;

@EnabledForJreRange(max = JRE.JAVA_16, disabledReason = "See: https://github.com/junit-pioneer/junit-pioneer/issues/509")
@DisplayName("JUnitPioneer system environment utilities")
@WritesEnvironmentVariable
class EnvironmentVariableUtilsTests {
Expand Down

0 comments on commit e669c33

Please sign in to comment.