mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
svn: Fix tests - wait change list manager in "tearDown()"
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user