Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2019-11-29 05:47:55 -0500
committerThomas Wolf2019-11-29 05:47:55 -0500
commit9ddff98d846c1983613f7f423af8d2b91c398d96 (patch)
tree0f4c357a6c44c3e3b7074e3ff7c952a8bd28c251
parentd11046c8e423dc8f4649c2702551b39008333529 (diff)
downloadegit-9ddff98d846c1983613f7f423af8d2b91c398d96.tar.gz
egit-9ddff98d846c1983613f7f423af8d2b91c398d96.tar.xz
egit-9ddff98d846c1983613f7f423af8d2b91c398d96.zip
[tests] Stabilize StashesMenuTest
The test should wait until the background job performing the operation on the stash has finished. Change-Id: Ia62770fddfaccb8a5c25293bdd7b9b4db95c7cfe Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/actions/StashesMenuTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/actions/StashesMenuTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/actions/StashesMenuTest.java
index 1cab418ed..544c6f4a7 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/actions/StashesMenuTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/actions/StashesMenuTest.java
@@ -15,6 +15,8 @@ import static org.junit.Assert.assertTrue;
import java.text.MessageFormat;
+import org.eclipse.egit.core.test.TestUtils;
+import org.eclipse.egit.ui.JobFamilies;
import org.eclipse.egit.ui.common.LocalRepositoryTestCase;
import org.eclipse.egit.ui.internal.UIText;
import org.eclipse.egit.ui.test.ContextMenuHelper;
@@ -66,6 +68,8 @@ public class StashesMenuTest extends LocalRepositoryTestCase {
enterMessageText.setText(stashMessage);
createDialog.bot().button(UIText.StashCreateCommand_ButtonOK).click();
+ TestUtils.waitForJobs(5000, JobFamilies.STASH);
+
assertEquals(originalContent, getTestFileContent());
ContextMenuHelper.clickContextMenu(selectProject(), "Team", STASHES,
@@ -81,6 +85,8 @@ public class StashesMenuTest extends LocalRepositoryTestCase {
util.getPluginLocalizedValue("StashApplyCommand.label"))
.click();
+ TestUtils.waitForJobs(5000, JobFamilies.STASH);
+
assertEquals(modifiedContent, getTestFileContent());
}

Back to the top