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.
}
public synchronized void toSilent(String message) {
if (state == STATE_FINISHED) {
return;
if (state != STATE_RUNNING && state != STATE_REQUEST_STOP) {
assert false : "cannot switch to silent mode when not running";
assertEquals("test1", main.getText());
assertEquals("message1", detail.getText());
public void testCanSwitchToSuspendLater() {
proghandle.start();
proghandle.finish();
proghandle.suspend("I am late, but I want suspend");
assertEquals("Remains finished", InternalHandle.STATE_FINISHED, handle.getState());
// tasks shorter than the InternalHandle.INITIAL_DELAY should be discarded.
@RandomlyFails // NB-Core-Build #1210
public void testIfShortOnesGetDiscarded() throws Exception {
@Override
public void run() {
if (EventQueue.isDispatchThread()) {
try {
h.suspend(NbBundle.getMessage(MenuWarmUpTask.class, "MSG_Refresh_Suspend"));
} catch (Throwable t) {
// ignore any errors
} else {
EventQueue.invokeLater(this);