Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2015-07-05 11:09:55 +0000
committerAndrey Loskutov2015-07-07 19:21:09 +0000
commit46c8482afb0a71c69d261239bd4e04806a31b094 (patch)
tree433e5ae1d8c264bf56d3e688ce3425afd1e36747 /org.eclipse.egit.ui.test
parente003dd221f10a6a2e1bdb60c5cc641bcb0aaf825 (diff)
downloadegit-46c8482afb0a71c69d261239bd4e04806a31b094.tar.gz
egit-46c8482afb0a71c69d261239bd4e04806a31b094.tar.xz
egit-46c8482afb0a71c69d261239bd4e04806a31b094.zip
Test stability: another attempt to have stable connect() behavior
Refactored ConnectProviderOperation to make it easier to understand and to be more verbose if it fails to connect. If multiple projects are to be connected, do not fail entire task if only some of the projects have issues. RepositoryFinder should also not silently fail during connect if resource is unknown in workspace. Change-Id: Ied79b1846495d7662ee40128b1a0edceb55d6860 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.egit.ui.test')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java6
1 files changed, 5 insertions, 1 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 d0acb554e7..2396c126db 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
@@ -37,6 +37,7 @@ import org.eclipse.egit.core.GitProvider;
import org.eclipse.egit.core.JobFamilies;
import org.eclipse.egit.core.RepositoryCache;
import org.eclipse.egit.core.internal.indexdiff.IndexDiffCache;
+import org.eclipse.egit.core.internal.util.ResourceUtil;
import org.eclipse.egit.core.op.AddToIndexOperation;
import org.eclipse.egit.core.op.CloneOperation;
import org.eclipse.egit.core.op.CommitOperation;
@@ -340,7 +341,10 @@ public abstract class LocalRepositoryTestCase extends EGitTestCase {
GitProvider.ID);
if (provider == null) {
TestUtil.waitForJobs(5000, 10000);
- provider = RepositoryProvider.getProvider(project, GitProvider.ID);
+ assertTrue("Project not shared with git: " + project,
+ ResourceUtil.isSharedWithGit(project));
+ TestUtil.waitForJobs(1000, 10000);
+ provider = RepositoryProvider.getProvider(project);
}
assertTrue("Project is not accessible: " + project,
project.isAccessible());

Back to the top