Skip to content

Commit

Permalink
see #21005 - Assume security manager property is set on Java >= 18
Browse files Browse the repository at this point in the history
Doesn't work right now, don't know why

git-svn-id: https://josm.openstreetmap.de/svn/trunk@18349 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
don-vip committed Dec 21, 2021
1 parent 3213cd5 commit 0370689
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/unit/org/openstreetmap/josm/actions/ExitActionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package org.openstreetmap.josm.actions;

import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assumptions.assumeTrue;

import java.awt.GraphicsEnvironment;

Expand All @@ -14,6 +15,7 @@
import org.openstreetmap.josm.gui.progress.swing.ProgressMonitorExecutor;
import org.openstreetmap.josm.testutils.JOSMTestRules;
import org.openstreetmap.josm.tools.ImageProvider;
import org.openstreetmap.josm.tools.Utils;

import com.ginsberg.junit.exit.ExpectSystemExitWithStatus;

Expand Down Expand Up @@ -41,6 +43,7 @@ final class ExitActionTest {
@ExpectSystemExitWithStatus(0)
void testActionPerformed() {
TestUtils.assumeWorkingJMockit();
assumeTrue(Utils.getJavaVersion() < 18 || "allow".equals(System.getProperty("java.security.manager")));

boolean[] workerShutdownCalled = {false};
boolean[] workerShutdownNowCalled = {false};
Expand Down

0 comments on commit 0370689

Please sign in to comment.