JDK-6957765 : Test Bug - javax/swing/SwingWorker/6480289/bug6480289.java failed on 1.7.0b94 but passed on previous
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
The regression test expects that several consequent workers will be executed on the same worker thread (that is, the worker thread will be reused).
Obviously, the test currently fails because of the following reason:
1. After the fix for the CR 6880336 (this is the latest fix for the SwingWorker class), the SwingWorker creates TPE (thread pool executor) with:
corePoolSize = MAX_WORKER_THREADS (10)
maximumPoolSize = MAX_WORKER_THREADS (10)
2. When a new task is submitted to the pool, and fewer than corePoolSize threads are running, a new thread is always created to handle the request, even if other worker threads are idle. This is how TPE works.
My hope is that external developers don't rely on the SwingWorker behaviour (reusing the worker threads as much as possible). Otherwise, new CR request should be submitted and considered for fixing (and most likely it will require changing the TPE-strategy for queuing and it's not a change for jdk7).
This is an intentional change rather than a regression. That is, the test should be either rewritten or removed.
Caused by the changes for 6880336.
I guess this is related to the recent fixes in SwingWorker by AWT team