kopia lustrzana https://github.com/JOSM/MapWithAI
Add an await to a test (to hopefully fix an issue with timeouts)
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
9585709a47
commit
894bd44c09
|
@ -1,6 +1,9 @@
|
|||
// License: GPL. For details, see LICENSE file.
|
||||
package org.openstreetmap.josm.plugins.mapwithai.backend;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.awaitility.Awaitility;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
|
@ -39,6 +42,8 @@ public class MapWithAIActionTest {
|
|||
|
||||
MainApplication.getLayerManager().addLayer(new OsmDataLayer(new DataSet(), "temporary", null));
|
||||
action.actionPerformed(null);
|
||||
Awaitility.await().timeout(8, TimeUnit.SECONDS)
|
||||
.until(() -> 1 == MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).size());
|
||||
Assert.assertEquals(1, MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).size());
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue