RFR: 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished [v7]

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Jan 31 14:42:29 UTC 2023


On Tue, 31 Jan 2023 13:00:10 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Test update
>
> test/jdk/javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java line 87:
> 
>> 85:             throw new RuntimeException("doInBackground is finished " +
>> 86:                                        " but State is not DONE");
>> 87:         }
> 
> I think you should wait for cleanup to finish and ensure that `doInBackground` is set to `true` and the state is `DONE`.
> 
> If you don't wait until cleanup wait completes, the test does not test anything because jtreg will shutdown the JVM as soon main thread exists, which will happen before `done` gets called.

Dont think so...If `doInBackground `is true it should mean cleanup is done as `doInBackground ` is false by default

-------------

PR: https://git.openjdk.org/jdk/pull/11940



More information about the client-libs-dev mailing list