JDK-6957765 : Test Bug - javax/swing/SwingWorker/6480289/bug6480289.java failed on 1.7.0b94 but passed on previous
Type:Bug
Component:client-libs
Sub-Component:java.awt
Affected Version:6u22,6u31-rev,7
Priority:P3
Status:Closed
Resolution:Fixed
OS:generic,solaris
CPU:generic,sparc
Submitted:2010-06-02
Updated:2012-03-02
Resolved:2011-05-18
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.
EVALUATION
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).
21-12-2010
EVALUATION
This is an intentional change rather than a regression. That is, the test should be either rewritten or removed.
09-06-2010
EVALUATION
Caused by the changes for 6880336.
07-06-2010
EVALUATION
I guess this is related to the recent fixes in SwingWorker by AWT team