Ignore:
Timestamp:
2021-11-03T01:08:48+01:00 (3 years ago)
Author:
Don-vip
Message:

see #21476 - fix non-regression test in CI environment (patch by taylor.smock)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/UploadActionTest.java

    r18302 r18306  
    1010import java.util.concurrent.TimeUnit;
    1111
    12 import org.junit.Ignore;
     12import org.junit.jupiter.api.BeforeAll;
    1313import org.junit.jupiter.api.Test;
    1414import org.junit.jupiter.api.extension.RegisterExtension;
     
    2727import org.openstreetmap.josm.testutils.mockers.WindowMocker;
    2828import org.openstreetmap.josm.tools.Logging;
     29import org.openstreetmap.josm.tools.Territories;
    2930
    3031import mockit.Invocation;
     
    3940class UploadActionTest {
    4041    // Only needed for layer cleanup. And user identity cleanup. And ensuring that data isn't accidentally uploaded.
     42    // Note that the setUp method can be replaced by the @Territories extension, when that is merged.
    4143    @RegisterExtension
    4244    JOSMTestRules josmTestRules = new JOSMTestRules().main().projection().fakeAPI();
     45
     46    @BeforeAll
     47    static void setUp() {
     48        // Territories is needed due to test pollution. One of the listeners
     49        // that may get registered on SelectionEventManager requires
     50        // Territories. Rather unfortunately, we also need the external data to
     51        // avoid the NPE.
     52        Territories.initialize();
     53    }
    4354
    4455    /**
     
    4657     */
    4758    @Test
    48     @Ignore("doesn't work on CI")
    4959    void testNonRegression21476() {
    5060        TestUtils.assumeWorkingJMockit();
Note: See TracChangeset for help on using the changeset viewer.