Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-05-05 12:09:16 +0000
committerThomas Wolf2016-05-05 13:35:53 +0000
commit2715a5c146addf9174d02eb7cad86b7d1a298b86 (patch)
tree8bc7b9ba5fe032f5f263efe8645017122107e836
parentc235e4c3fba4da7ef76fa7a4a2f658df1cc0dc32 (diff)
downloadegit-2715a5c146addf9174d02eb7cad86b7d1a298b86.tar.gz
egit-2715a5c146addf9174d02eb7cad86b7d1a298b86.tar.xz
egit-2715a5c146addf9174d02eb7cad86b7d1a298b86.zip
Test stability: really shut down repositories
Otherwise, repositories from previous tests may remain registered, and may at some later point found to have gone and a new refresh of the repo view may be scheduled. As a result, we may have asynchronous refreshes that occur during SWT bot tests, and tree nodes disappear at unpredictable moments. Also: in commitNonWSChangesTest, repo view is opened after a commit and thus must also wait until the repo view refresh is over before trying to find tree nodes. Change-Id: I43ff9bee19fb4983cd44486a4085640f2dac0497 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java1
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitNonWSChangesTest.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java
index ad75191040..eee6a7ebea 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java
@@ -248,6 +248,7 @@ public abstract class LocalRepositoryTestCase extends EGitTestCase {
.getPreferences();
synchronized (prefs) {
prefs.put(RepositoryUtil.PREFS_DIRECTORIES, "");
+ prefs.put(RepositoryUtil.PREFS_DIRECTORIES_REL, "");
prefs.flush();
}
}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitNonWSChangesTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitNonWSChangesTest.java
index 91e13cae07..e64e85594d 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitNonWSChangesTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitNonWSChangesTest.java
@@ -117,6 +117,7 @@ public class CommitNonWSChangesTest extends LocalRepositoryTestCase {
private void clickOnCommit() throws Exception {
SWTBotView repoView = TestUtil.showView(RepositoriesView.VIEW_ID);
+ TestUtil.joinJobs(JobFamilies.REPO_VIEW_REFRESH);
SWTBotTree tree = repoView.bot().tree();
TestUtil.waitUntilTreeHasNodeContainsText(bot, tree, REPO1, 10000);
tree.getAllItems()[0].contextMenu("Commit...").click();

Back to the top