Skip to content

Commit 27860dd

Browse files
kernel: fix static shutDown flag in ThreadPool causing test isolation failures
ThreadPool.shutDown was declared static, so calling safeShutDown() on any instance permanently poisoned all future instances in the same JVM. In TCPEchoRawXMLTest, tearDown() after the first test set the flag, then each subsequent test's setUp() failed with "Thread pool is shut down" (and left a leaked ServerSocket on port 5555, causing "Address already in use" for the remaining tests). Fix: change to an instance field so each ThreadPool tracks its own lifecycle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a1b414e commit 27860dd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/kernel/src/org/apache/axis2/util/threadpool/ThreadPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
public class ThreadPool implements ThreadFactory {
4444
private static final Log log = LogFactory.getLog(ThreadPool.class);
4545
protected static long SLEEP_INTERVAL = 1000;
46-
private static boolean shutDown;
46+
private boolean shutDown;
4747
protected ThreadPoolExecutor executor;
4848

4949
//integers that define the pool size, with the default values set.

0 commit comments

Comments
 (0)