This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When some tasks are scheduled for a later execution using a delay, then awaitTermination() does not wait for them and returns immediately. This deficiency forces me to write an ugly reflection code, like http://hg.netbeans.org/core-main/rev/25568e635ba9 (it's a test only) and even that is not reliable. Javadoc of awaitTermination() does not mention scheduled tasks, thus I suppose that it should wait for all tasks, regardless of their scheduled status.