svn: Fix tests - wait change list manager in "tearDown()"

This commit is contained in:
Konstantin Kolosovsky
2018-11-01 00:35:26 +03:00
parent 30fafe75a9
commit 5007a810b0
@@ -23,6 +23,7 @@ import com.intellij.openapi.vcs.rollback.RollbackProgressListener;
import com.intellij.openapi.vcs.update.CommonUpdateProjectAction;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.testFramework.ApplicationRule;
import com.intellij.testFramework.RunAll;
import com.intellij.testFramework.fixtures.IdeaTestFixtureFactory;
import com.intellij.testFramework.fixtures.TempDirTestFixture;
import com.intellij.testFramework.vcs.AbstractJunitVcsTestCase;
@@ -207,15 +208,28 @@ public abstract class SvnTestCase extends AbstractJunitVcsTestCase {
@After
public void tearDown() throws Exception {
runInEdtAndWait(() -> {
tearDownProject();
runInEdtAndWait(
() -> new RunAll(
this::waitChangeListManager,
this::tearDownProject,
this::tearDownTempDirectoryFixture,
() -> resetCanonicalTempPathCache(ORIGINAL_TEMP_DIRECTORY)
).run()
);
}
if (myTempDirFixture != null) {
myTempDirFixture.tearDown();
myTempDirFixture = null;
}
resetCanonicalTempPathCache(ORIGINAL_TEMP_DIRECTORY);
});
private void waitChangeListManager() {
if (changeListManager != null) {
changeListManager.forceStopInTestMode();
changeListManager.waitEverythingDoneInTestMode();
}
}
private void tearDownTempDirectoryFixture() throws Exception {
if (myTempDirFixture != null) {
myTempDirFixture.tearDown();
myTempDirFixture = null;
}
}
protected ProcessOutput runSvn(String... commandLine) throws IOException {