Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-07-09 16:25:53 -0400
committerspingel2010-07-09 16:25:53 -0400
commitf68611b33195cf01afa41852789212bf0a3056c6 (patch)
treebc58af327d6df1d8191bd634e5346905eea24cee
parent0962c0dc9a53171ee74a4130096aaa3757d9e890 (diff)
downloadorg.eclipse.mylyn.tasks-f68611b33195cf01afa41852789212bf0a3056c6.tar.gz
org.eclipse.mylyn.tasks-f68611b33195cf01afa41852789212bf0a3056c6.tar.xz
org.eclipse.mylyn.tasks-f68611b33195cf01afa41852789212bf0a3056c6.zip
NEW - bug 318271: fix failing tests for 3.5
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318271
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java9
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientFactoryTest.java3
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java10
3 files changed, 14 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java
index 6b2a361bb..c6d903a46 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java
@@ -63,16 +63,19 @@ public class LinkProviderTest extends TestCase {
}
public void testTimeout() {
- System.setProperty(ITasksCoreConstants.PROPERTY_LINK_PROVIDER_TIMEOUT, "50");
+ System.setProperty(ITasksCoreConstants.PROPERTY_LINK_PROVIDER_TIMEOUT, "500");
- provider.timeout = 40;
+ provider.timeout = 10;
TasksUiPlugin.getDefault().getRepositoryForResource(ResourcesPlugin.getWorkspace().getRoot());
assertEquals(1, provider.executions);
- provider.timeout = 60;
+ // should cause provider to get removed
+ provider.timeout = 2000;
TasksUiPlugin.getDefault().getRepositoryForResource(ResourcesPlugin.getWorkspace().getRoot());
assertEquals(2, provider.executions);
+ // provider should no longer get called
+ provider.timeout = 10;
TasksUiPlugin.getDefault().getRepositoryForResource(ResourcesPlugin.getWorkspace().getRoot());
assertEquals(2, provider.executions);
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientFactoryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientFactoryTest.java
index 135a5f6e8..27a7a41db 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientFactoryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientFactoryTest.java
@@ -59,12 +59,11 @@ public class TracClientFactoryTest extends TestCase {
public void testProbeClient() throws Exception {
String url = fixture.getRepositoryUrl();
- boolean xmlrpcInstalled = (fixture.getAccessMode() == Version.XML_RPC);
Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
WebLocation location = new WebLocation(url, credentials.username, credentials.password);
Version version = TracClientFactory.probeClient(location);
- if (xmlrpcInstalled) {
+ if (fixture.isXmlRpcEnabled()) {
assertEquals(Version.XML_RPC, version);
} else {
assertEquals(Version.TRAC_0_9, version);
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
index 63d76fe29..b84f73e49 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
@@ -72,10 +72,10 @@ public class TracFixture extends TestFixture {
"0.12", "XML-RPC");
public static TracFixture TRAC_TRUNK_WEB = new TracFixture(Version.TRAC_0_9, TracTestConstants.TEST_TRAC_TRUNK_URL,
- "0.12dev-r0", "Web");
+ "0.13dev-r0", "Web");
public static TracFixture TRAC_TRUNK_XML_RPC = new TracFixture(Version.XML_RPC,
- TracTestConstants.TEST_TRAC_TRUNK_URL, "0.12dev-r0", "XML-RPC");
+ TracTestConstants.TEST_TRAC_TRUNK_URL, "0.13dev-r0", "XML-RPC");
public static TracFixture DEFAULT = TRAC_0_12_XML_RPC;
@@ -85,7 +85,7 @@ public class TracFixture extends TestFixture {
* Standard configurations for running all test against.
*/
public static final TracFixture[] ALL = new TracFixture[] { TRAC_0_10_WEB, TRAC_0_11_WEB, TRAC_0_12_WEB,
- TRAC_TRUNK_WEB, TRAC_0_10_XML_RPC, TRAC_0_11_XML_RPC, TRAC_0_12_XML_RPC, TRAC_TRUNK_XML_RPC, /* TRAC_0_10_XML_RPC_SSL, */};
+ /* TRAC_TRUNK_WEB, */TRAC_0_10_XML_RPC, TRAC_0_11_XML_RPC, TRAC_0_12_XML_RPC, /* TRAC_TRUNK_XML_RPC, TRAC_0_10_XML_RPC_SSL, */};
// public static final TracFixture[] ALL = new TracFixture[] { TRAC_TRUNK_XML_RPC };
@@ -216,6 +216,10 @@ public class TracFixture extends TestFixture {
return version;
}
+ public boolean isXmlRpcEnabled() {
+ return true;
+ }
+
public TaskRepository singleRepository(TracRepositoryConnector connector) {
connector.getClientManager().writeCache();
TaskRepository repository = super.singleRepository();

Back to the top