Changeset 14069 in josm


Ignore:
Timestamp:
2018-08-01T19:20:20+02:00 (15 months ago)
Author:
Don-vip
Message:

see #16010 - fix failing unit test (patch by ris)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java

    r14068 r14069  
    66import static org.junit.Assert.assertNull;
    77import static org.junit.Assert.assertTrue;
     8import static java.util.concurrent.TimeUnit.MILLISECONDS;
    89
     10import org.awaitility.Awaitility;
    911import org.junit.Rule;
    1012import org.junit.Test;
     
    4749        final TileSourceRule tileSourceRule = this.test.getTileSourceRule();
    4850
    49         TMSLayer layer = new TMSLayer(
     51        final TMSLayer layer = new TMSLayer(
    5052            tileSourceRule.getSourcesList().get(0).getImageryInfo(tileSourceRule.port())
    5153        );
     
    5860            assertNotNull(task);
    5961            task.run();
    60             // Ensure cache is not empty
    61             assertFalse(TMSLayer.getCache().getMatching(".*").isEmpty());
     62            // Ensure cache is (eventually) not empty
     63            Awaitility.await().atMost(10000, MILLISECONDS).until(() -> !TMSLayer.getCache().getMatching(".*").isEmpty());
    6264        } finally {
    6365            // Ensure we clean the place before leaving, even if test fails.
Note: See TracChangeset for help on using the changeset viewer.