On Tue, 31 Jan 2023 11:13:14 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> test/jdk/javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java line 72: >> >>> 70: Thread.sleep(5000); >>> 71: >>> 72: worker.cancel(true); >> >> I still suggest ensuring `cancel` does not take too long. > > Not sure I understand this...please elaborate... Something like this: https://github.com/aivanov-jdk/jdk/blob/15580d0f1a3a9630b224bb567aacec03d825c777/test/jdk/javax/swing/SwingWorker/TestSwingWorker.java#L83-L90 You can take all the changes to the test as it is quicker and configurable. ------------- PR: https://git.openjdk.org/jdk/pull/11940