Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-05-25 19:19:03 +0000
committerMatthias Sohn2016-05-29 23:40:03 +0000
commitcfeb6e18377bd8a7779b4be838fd640dd2966397 (patch)
treea2b0974b224199c75479f359ff91a980780ecbc7
parent468c3498efdcb8f98d4dfdf640edc05cb3ecff7f (diff)
downloadegit-cfeb6e18377bd8a7779b4be838fd640dd2966397.tar.gz
egit-cfeb6e18377bd8a7779b4be838fd640dd2966397.tar.xz
egit-cfeb6e18377bd8a7779b4be838fd640dd2966397.zip
Test stability: wait for index diff cache update
Apparently the DisconnectConnectTest.testDecorations() not always waits long enough for the decorations to appear. Decorations are triggered by an index diff cache update, so let's wait for that first, and only then for the decoration job. Change-Id: I5b32299006a99f3332b49e70d1fcdbfa375d362f Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/DisconnectConnectTest.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/DisconnectConnectTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/DisconnectConnectTest.java
index 4a55ea6569..5c69e84c29 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/DisconnectConnectTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/DisconnectConnectTest.java
@@ -19,6 +19,7 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Path;
+import org.eclipse.egit.core.JobFamilies;
import org.eclipse.egit.core.project.RepositoryMapping;
import org.eclipse.egit.ui.common.LocalRepositoryTestCase;
import org.eclipse.egit.ui.internal.UIText;
@@ -85,6 +86,7 @@ public class DisconnectConnectTest extends LocalRepositoryTestCase {
touch("File modified");
clickOnDisconnect();
TestUtil.waitForJobs(500, 5000);
+ TestUtil.joinJobs(JobFamilies.INDEX_DIFF_CACHE_UPDATE);
TestUtil.waitForDecorations();
assertFalse("Project should not have git decorations",
getProjectItem(projectExplorerTree, PROJ1).getText()
@@ -92,6 +94,7 @@ public class DisconnectConnectTest extends LocalRepositoryTestCase {
SWTBotShell connectDialog = openConnectDialog();
connectDialog.bot().button(IDialogConstants.FINISH_LABEL).click();
TestUtil.waitForJobs(500, 5000);
+ TestUtil.joinJobs(JobFamilies.INDEX_DIFF_CACHE_UPDATE);
TestUtil.waitForDecorations();
assertTrue("Project should have git decorations",
getProjectItem(projectExplorerTree, PROJ1).getText()

Back to the top