Remove unnecessary worker wait and rename test

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-08-18 13:00:04 -06:00
rodzic d8969f38eb
commit e24322ffd8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
2 zmienionych plików z 1 dodań i 11 usunięć

Wyświetl plik

@ -28,7 +28,7 @@ class AddMapWithAILayerActionTest {
JOSMTestRules rule = new MapWithAITestRules().wiremock().sources().projection();
@Test
void test() {
void testAddMapWithAILayerActionTest() {
MapWithAIInfo info = MapWithAILayerInfo.getInstance().getLayers().stream()
.filter(i -> i.getName().equalsIgnoreCase("MapWithAI")).findAny().orElse(null);
AddMapWithAILayerAction action = new AddMapWithAILayerAction(info);

Wyświetl plik

@ -18,9 +18,7 @@ import org.awaitility.Awaitility;
import org.awaitility.Durations;
import org.junit.jupiter.api.extension.InvocationInterceptor.Invocation;
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.swing.ProgressMonitorExecutor;
import org.openstreetmap.josm.io.OsmApi;
import org.openstreetmap.josm.io.OsmApiInitializationException;
import org.openstreetmap.josm.io.OsmTransferCanceledException;
@ -171,14 +169,6 @@ public class MapWithAITestRules extends JOSMTestRules {
@Override
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();
if (wiremock) {
wireMock.stop();