Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-05-25 22:08:53 +0000
committerMatthias Sohn2016-05-30 08:36:09 +0000
commita560b6da154fd73064a3db715ecc9deb4c640e6a (patch)
tree3d9a1eab6e068dd80653098d9c6e717739ab5eaa /org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test
parentcfeb6e18377bd8a7779b4be838fd640dd2966397 (diff)
downloadegit-a560b6da154fd73064a3db715ecc9deb4c640e6a.tar.gz
egit-a560b6da154fd73064a3db715ecc9deb4c640e6a.tar.xz
egit-a560b6da154fd73064a3db715ecc9deb4c640e6a.zip
Test stability: wait for add to index/remove from index jobs
Staging tests need not only wait for an index diff update but also and first for the add to index or remove from index jobs. This should resolve spurious test failures in StageUnstageActionTest. Change-Id: I20efada649b0d7c92701ded7c2a471a17d600ec8 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java
index 5f28c01d3..0b5ced7b7 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java
@@ -7,6 +7,8 @@
*******************************************************************************/
package org.eclipse.egit.ui.test.team.actions;
+import static org.eclipse.egit.ui.JobFamilies.ADD_TO_INDEX;
+import static org.eclipse.egit.ui.JobFamilies.REMOVE_FROM_INDEX;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -100,6 +102,7 @@ public class StageUnstageActionTest extends LocalRepositoryTestCase {
util.getProjectItems(projectExplorerTree, PROJ_A)[0].select();
ContextMenuHelper.clickContextMenuSync(projectExplorerTree, "Team",
addToIndexLabel);
+ TestUtil.joinJobs(ADD_TO_INDEX);
TestUtil.joinJobs(JobFamilies.INDEX_DIFF_CACHE_UPDATE);
// Verify file got staged
verifyStaging(PROJ_A, filePath, true);
@@ -110,6 +113,7 @@ public class StageUnstageActionTest extends LocalRepositoryTestCase {
"Team", addToIndexLabel));
ContextMenuHelper.clickContextMenuSync(projectExplorerTree, "Team",
removeFromIndexLabel);
+ TestUtil.joinJobs(REMOVE_FROM_INDEX);
TestUtil.joinJobs(JobFamilies.INDEX_DIFF_CACHE_UPDATE);
// Verify file is unstaged again
verifyStaging(PROJ_A, filePath, false);
@@ -130,6 +134,7 @@ public class StageUnstageActionTest extends LocalRepositoryTestCase {
// Add to index
ContextMenuHelper.clickContextMenuSync(projectExplorerTree, "Team",
addToIndexLabel);
+ TestUtil.joinJobs(ADD_TO_INDEX);
TestUtil.joinJobs(JobFamilies.INDEX_DIFF_CACHE_UPDATE);
// Verify both files got staged
verifyStaging(PROJ_A, filePath, true);
@@ -139,6 +144,7 @@ public class StageUnstageActionTest extends LocalRepositoryTestCase {
// Remove from index
ContextMenuHelper.clickContextMenuSync(projectExplorerTree, "Team",
removeFromIndexLabel);
+ TestUtil.joinJobs(REMOVE_FROM_INDEX);
TestUtil.joinJobs(JobFamilies.INDEX_DIFF_CACHE_UPDATE);
// Verify both files got unstaged
verifyStaging(PROJ_A, filePath, false);

Back to the top