Changeset 18668 in josm for trunk


Ignore:
Timestamp:
2023-02-20T14:38:35+01:00 (14 months ago)
Author:
taylor.smock
Message:

See #22753: Fix GitHub Actions

This *should* fix the failing Java 8 and Java 17 tests on Windows by forcing
the worker thread to finish instead of sending an empty call to the method,
under the assumption that the thread will sync (this works for only some test
threads).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java

    r18549 r18668  
    1313import java.io.StringWriter;
    1414import java.lang.reflect.Field;
     15import java.util.concurrent.TimeUnit;
    1516import java.util.function.Consumer;
    1617import java.util.logging.Handler;
     
    136137                        })),
    137138                Arguments.of("GuiHelper::runInEDTAndWait", (Consumer<Runnable>) GuiHelper::runInEDTAndWait),
    138                 Arguments.of("MainApplication.worker", (Consumer<Runnable>) MainApplication.worker::execute)
     139                Arguments.of("MainApplication.worker", (Consumer<Runnable>) runnable ->
     140                        assertDoesNotThrow(() -> MainApplication.worker.submit(runnable).get(1, TimeUnit.SECONDS)))
    139141        );
    140142    }
Note: See TracChangeset for help on using the changeset viewer.