<div dir="ltr">I don't know if it's related. But when running systemTests with Robot, it gets stuck on a Swing test - it never exits.<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua., 24 de abr. de 2024 às 08:42, Johan Vos <<a href="mailto:johan.vos@gluonhq.com">johan.vos@gluonhq.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">While working on the systemtests for the Headless platform, I noticed timing issues with the Marlin QPath Test. Those have nothing to do with Marlin, but rather with the lifecycle. After the test ran, `test.util.Shutdown` is invoked (not on the JavaFX app thread). I noticed that this caused a timeout almost always when running the systemtest with the headless platform, and almost never when running with the regular (Gtk) platform. <div>The problem is that the `test.util.Shutdown` method is invoking Platform.runLater() but in some cases (almost always in Headless and almost never in GTK) the runLater is not accepting runnables anymore. This happens because of the PlatformImpl.checkIdle which will shutdown the platform in case there are no windows and no pending runnables (and a few more conditions). This check runs on the JavaFX app thread, and it might trigger `tkExit` before the test-thread invokes `test.util.Shutdown`.</div><div><br></div><div>There are a number of ways to solve this, e.g.</div><div>* get rid of the separate shutdown procedure in the system tests. </div><div>* set Platform.setImplicitExit(false) which will prevent tkExit being called when the last window is gone</div><div>* add more safety in test.util.Shutdown so that it doesn't try to use the FX App thread when that is not accepting new runnables</div><div>* ...</div><div><br></div><div>Thoughts?</div><div><br></div><div>- Johan</div></div>
</blockquote></div>