Method TestPanel.stop() stops secondary thread and waits for the moment it is finished using Thread.wait():
public void stop() {
active = false;
try {
synchronized (sync) {
sync.notify();
}
synchronized (thread) {
thread.wait();
}
} catch (InterruptedException ex) {
}
}
Usually system 'notify' occurs for that wait() and the test exits normally, but on some machines (i.e. stt-96-vmw5) it doesn't happen and the test gets frozen.
To resolve this issue 'waiting' code should be rewritten to guarantee the notification of thread's finishing.