kopia lustrzana https://github.com/JOSM/MapWithAI
Remove unnecessary worker wait and rename test
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
d8969f38eb
commit
e24322ffd8
|
@ -28,7 +28,7 @@ class AddMapWithAILayerActionTest {
|
||||||
JOSMTestRules rule = new MapWithAITestRules().wiremock().sources().projection();
|
JOSMTestRules rule = new MapWithAITestRules().wiremock().sources().projection();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void test() {
|
void testAddMapWithAILayerActionTest() {
|
||||||
MapWithAIInfo info = MapWithAILayerInfo.getInstance().getLayers().stream()
|
MapWithAIInfo info = MapWithAILayerInfo.getInstance().getLayers().stream()
|
||||||
.filter(i -> i.getName().equalsIgnoreCase("MapWithAI")).findAny().orElse(null);
|
.filter(i -> i.getName().equalsIgnoreCase("MapWithAI")).findAny().orElse(null);
|
||||||
AddMapWithAILayerAction action = new AddMapWithAILayerAction(info);
|
AddMapWithAILayerAction action = new AddMapWithAILayerAction(info);
|
||||||
|
|
|
@ -18,9 +18,7 @@ import org.awaitility.Awaitility;
|
||||||
import org.awaitility.Durations;
|
import org.awaitility.Durations;
|
||||||
import org.junit.jupiter.api.extension.InvocationInterceptor.Invocation;
|
import org.junit.jupiter.api.extension.InvocationInterceptor.Invocation;
|
||||||
import org.junit.runners.model.InitializationError;
|
import org.junit.runners.model.InitializationError;
|
||||||
import org.openstreetmap.josm.gui.MainApplication;
|
|
||||||
import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
|
import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
|
||||||
import org.openstreetmap.josm.gui.progress.swing.ProgressMonitorExecutor;
|
|
||||||
import org.openstreetmap.josm.io.OsmApi;
|
import org.openstreetmap.josm.io.OsmApi;
|
||||||
import org.openstreetmap.josm.io.OsmApiInitializationException;
|
import org.openstreetmap.josm.io.OsmApiInitializationException;
|
||||||
import org.openstreetmap.josm.io.OsmTransferCanceledException;
|
import org.openstreetmap.josm.io.OsmTransferCanceledException;
|
||||||
|
@ -171,14 +169,6 @@ public class MapWithAITestRules extends JOSMTestRules {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void after() throws ReflectiveOperationException {
|
protected void after() throws ReflectiveOperationException {
|
||||||
ProgressMonitorExecutor worker = (ProgressMonitorExecutor) MainApplication.worker;
|
|
||||||
while (worker.getActiveCount() > 0) {
|
|
||||||
try {
|
|
||||||
wait(20);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
Logging.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
super.after();
|
super.after();
|
||||||
if (wiremock) {
|
if (wiremock) {
|
||||||
wireMock.stop();
|
wireMock.stop();
|
||||||
|
|
Ładowanie…
Reference in New Issue