mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[git] Don't scan for roots in tests
This commit is contained in:
@@ -17,6 +17,7 @@ package git4idea.roots;
|
||||
|
||||
import com.intellij.ProjectTopics;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.DumbAwareRunnable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.ModuleRootEvent;
|
||||
@@ -111,6 +112,11 @@ public class GitRootScanner implements BulkFileListener, ModuleRootListener, Dis
|
||||
}
|
||||
|
||||
private void scheduleScan() {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
// don't scan in tests
|
||||
return;
|
||||
}
|
||||
|
||||
myAlarm.cancelAllRequests(); // one scan is enough, no need to queue, they all do the same
|
||||
myAlarm.addRequest(new Runnable() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user