test fixed

This commit is contained in:
Dmitry Avdeev
2013-05-20 14:52:03 +04:00
parent 2d4a584e3e
commit e5b44d6d5a
@@ -445,7 +445,12 @@ public class ProgressManagerImpl extends ProgressManager implements Disposable{
@Override
public void run(@NotNull final Task task) {
if (task.isHeadless()) {
runProcessWithProgressSynchronously(task, null);
if (ApplicationManager.getApplication().isDispatchThread()) {
runProcessWithProgressSynchronously(task, null);
}
else {
new TaskRunnable(task, new EmptyProgressIndicator()).run();
}
}
else if (task.isModal()) {
runProcessWithProgressSynchronously(task.asModal(), null);