Sometimes test/javax/swing/system/6799345/TestShutdown.java "hangs"
Usually, it takes up to 10 attempts to reproduce this "hang".
The hang/waiting happens during call targetAppContext.dispose().
The sequence of the appContext disposal is following
Debugging log reveals that this "hang" happens during ThreadGroup.destroy call
and occurs only when AWT creates additional EDT threads during the disposal.
This should be fixed by additional check for AppContext.isDisposed() just before EDT creation (EventQueue.initDispatchThread())