Skip to content

Commit 6a190ed

Browse files
committed
Drop flushEventQueue from OpenResolutionLevelCommandTest
Synchronous active-pyramidal registration makes the EDT flush obsolete.
1 parent 8f65a54 commit 6a190ed

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

ome-zarr-fiji-ui/src/test/java/ome/zarr/fijiui/plugin/OpenResolutionLevelCommandTest.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -241,28 +241,10 @@ private static OpenResolutionLevelCommand createCommand( final Context context )
241241
private static void runCommand( final Context context, final Map< String, Object > inputs )
242242
throws ExecutionException, InterruptedException
243243
{
244-
// A dataset opened in ImageJ becomes the active pyramidal only via the
245-
// asynchronous AWT "activeWindow" event that PyramidalService listens for.
246-
// Flush the event queue so that event is processed and the active pyramidal
247-
// is resolved before the command's preprocessor injects it; otherwise the
248-
// command cancels for lack of an active dataset (flaky under test load).
249-
flushEventQueue();
250244
CommandInfo info = context.getService( CommandService.class ).getCommand( OpenResolutionLevelCommand.class );
251245
context.getService( ModuleService.class ).run( info, true, inputs ).get();
252246
}
253247

254-
private static void flushEventQueue() throws InterruptedException
255-
{
256-
try
257-
{
258-
SwingUtilities.invokeAndWait( () -> {} );
259-
}
260-
catch ( InvocationTargetException e )
261-
{
262-
throw new IllegalStateException( e );
263-
}
264-
}
265-
266248
private static void closeWindows()
267249
{
268250
try

0 commit comments

Comments
 (0)