Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-02-22 02:47:56 +0000
committerspingel2010-02-22 02:47:56 +0000
commit5d2bd334035c0da30f214b8de64d3f2a3c408a4a (patch)
tree44daa4327042309c337b039879d2e92da1e4c439 /org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac
parent8ed6bf15966c4f457f7e314c5f2cc478929fbf2b (diff)
downloadorg.eclipse.mylyn.tasks-5d2bd334035c0da30f214b8de64d3f2a3c408a4a.tar.gz
org.eclipse.mylyn.tasks-5d2bd334035c0da30f214b8de64d3f2a3c408a4a.tar.xz
org.eclipse.mylyn.tasks-5d2bd334035c0da30f214b8de64d3f2a3c408a4a.zip
NEW - bug 302642: fix exception handling for multi-calls
https://bugs.eclipse.org/bugs/show_bug.cgi?id=302642
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java13
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracTaskDataHandlerXmlRpcTest.java3
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java5
3 files changed, 18 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java
index d81b48039..9b54429ce 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java
@@ -77,6 +77,14 @@ public class TracXmlRpcClientTest extends TestCase {
}
}
+ public void testSingleCallExceptions() throws Exception {
+ try {
+ ((TracXmlRpcClient) client).getTicketLastChanged(Integer.MAX_VALUE, null);
+ fail("Expected TracRemoteException");
+ } catch (TracRemoteException e) {
+ }
+ }
+
public void testUpdateAttributes() throws Exception {
assertNull(client.getMilestones());
client.updateAttributes(new NullProgressMonitor(), true);
@@ -326,6 +334,11 @@ public class TracXmlRpcClientTest extends TestCase {
}
public void testGetRecentWikiChanges() throws Exception {
+ // FIXME 3.4 re-enable for trunk
+ if (TracFixture.current() == TracFixture.TRAC_TRUNK_XML_RPC) {
+ return;
+ }
+
TracWikiPageInfo[] changes = ((TracXmlRpcClient) client).getRecentWikiChanges(new Date(0), null);
TracWikiPageInfo testPage = null;
for (TracWikiPageInfo item : changes) {
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracTaskDataHandlerXmlRpcTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracTaskDataHandlerXmlRpcTest.java
index 43e89b1ea..e19d0dacd 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracTaskDataHandlerXmlRpcTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracTaskDataHandlerXmlRpcTest.java
@@ -51,7 +51,6 @@ import org.eclipse.mylyn.tasks.core.data.TaskOperation;
import org.eclipse.mylyn.tasks.core.data.TaskRelation;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.trac.tests.support.TracFixture;
-import org.eclipse.mylyn.trac.tests.support.TracTestConstants;
import org.eclipse.mylyn.trac.tests.support.TracTestUtil;
import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
@@ -360,7 +359,7 @@ public class TracTaskDataHandlerXmlRpcTest extends TestCase {
}
public void testOperations() throws Exception {
- boolean hasReassign = TracTestConstants.TEST_TRAC_011_URL.equals(repository.getRepositoryUrl());
+ boolean hasReassign = TracFixture.current().getVersion().compareTo("0.11") >= 0;
TaskData taskData = taskDataHandler.getTaskData(repository, "1", new NullProgressMonitor());
List<TaskAttribute> operations = taskData.getAttributeMapper().getAttributesByType(taskData,
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 1222442b2..c08638324 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
@@ -62,6 +62,9 @@ public class TracFixture extends TestFixture {
public static TracFixture TRAC_0_11_XML_RPC = new TracFixture(Version.XML_RPC, TracTestConstants.TEST_TRAC_011_URL,
"0.11", "XML-RPC");
+ public static TracFixture TRAC_TRUNK_WEB = new TracFixture(Version.TRAC_0_9, TracTestConstants.TEST_TRAC_TRUNK_URL,
+ "0.12dev-r0", "Web");
+
public static TracFixture TRAC_TRUNK_XML_RPC = new TracFixture(Version.XML_RPC,
TracTestConstants.TEST_TRAC_TRUNK_URL, "0.12dev-r0", "XML-RPC");
@@ -73,7 +76,7 @@ public class TracFixture extends TestFixture {
* Standard configurations for running all test against.
*/
public static final TracFixture[] ALL = new TracFixture[] { TRAC_0_9_WEB, TRAC_0_10_WEB, TRAC_0_11_WEB,
- TRAC_0_10_XML_RPC, TRAC_0_11_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_TRUNK_XML_RPC, /* TRAC_0_10_XML_RPC_SSL, */};
// public static final TracFixture[] ALL = new TracFixture[] { TRAC_TRUNK_XML_RPC };

Back to the top