Changeset 18669 in josm for trunk/test


Ignore:
Timestamp:
2023-02-20T14:42:48+01:00 (21 months ago)
Author:
taylor.smock
Message:

See #22753: Fix GitHub Actions

This drops the sync call in the test itself and makes it part of the worker
thread call.

File:
1 edited

Legend:

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

    r18668 r18669  
    137137                        })),
    138138                Arguments.of("GuiHelper::runInEDTAndWait", (Consumer<Runnable>) GuiHelper::runInEDTAndWait),
    139                 Arguments.of("MainApplication.worker", (Consumer<Runnable>) runnable ->
    140                         assertDoesNotThrow(() -> MainApplication.worker.submit(runnable).get(1, TimeUnit.SECONDS)))
     139                Arguments.of("MainApplication.worker", (Consumer<Runnable>) runnable -> {
     140                    MainApplication.worker.execute(runnable);
     141                    assertDoesNotThrow(() -> MainApplication.worker.submit(() -> { /* Sync thread */}).get(1, TimeUnit.SECONDS));
     142                })
    141143        );
    142144    }
     
    154156            Logging.trace(e);
    155157        }
    156         // Ensure that the threads are synced
    157         assertDoesNotThrow(() -> worker.accept(() -> { /* sync */ }));
    158158        // Now throw an exception
    159159        BugReport bugReport = new BugReport(BugReport.intercept(new IOException("testSuppressedExceptions")));
Note: See TracChangeset for help on using the changeset viewer.