Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,12 @@ public void testRemovingConsoleDisposesZoomFont(TestInfo testInfo) throws Except
assertFalse(zoomFont.isDisposed(), "the zoom font must not be disposed while its console is still open");

removeConsoles(console);
TestUtil.processUIEvents(200);
long startTime = System.currentTimeMillis();
while (getConsoleManager().getConsoles().length > 0 && System.currentTimeMillis() - startTime < 60_000) {
TestUtil.processUIEvents(200);
}
assertEquals(0, getConsoleManager().getConsoles().length, "Should have no consoles after removal, but some are still present: " + Arrays.toString(getConsoleManager().getConsoles()));
assertTrue(zoomFont.isDisposed(), "the zoom font must be disposed once its console is removed");
TestUtil.waitWhile(() -> getConsoleManager().getConsoles().length > 0, 60_000,
() -> "Should have no consoles after removal, but some are still present: "
+ Arrays.toString(getConsoleManager().getConsoles()));
// the zoom fonts are disposed a UI cycle later, see ConsoleZoomHandler
TestUtil.waitWhile(() -> !zoomFont.isDisposed(), 10_000,
() -> "the zoom font must be disposed once its console is removed");
} finally {
removeConsoles(console);
hideConsoleView(consoleView);
Expand Down
Loading