Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-02-02 12:32:08 +0000
committerSteffen Pingel2012-02-02 12:32:08 +0000
commitadf9b13be1d088f092c4d3427c8f04674664d1d4 (patch)
tree9a49c52ad5d39b1c62fd8c834786edb32001de71 /org.eclipse.mylyn.trac.tests/src
parent0d08a0917251974ba720a2bd2828f19f252e3b7f (diff)
downloadorg.eclipse.mylyn.tasks-adf9b13be1d088f092c4d3427c8f04674664d1d4.tar.gz
org.eclipse.mylyn.tasks-adf9b13be1d088f092c4d3427c8f04674664d1d4.tar.xz
org.eclipse.mylyn.tasks-adf9b13be1d088f092c4d3427c8f04674664d1d4.zip
REOPENED - bug 369697: fix test failures on Java 1.7
https://bugs.eclipse.org/bugs/show_bug.cgi?id=369697
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java10
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracTaskDataHandlerXmlRpcTest.java2
2 files changed, 9 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java
index 0a654b3b2..e2a068837 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java
@@ -258,15 +258,19 @@ public class TracRepositoryConnectorTest extends TestCase {
}
public void testUpdateTaskFromTaskDataSummaryOnly() throws Exception {
- TracTicket ticket = new TracTicket(456);
- ticket.putBuiltinValue(Key.SUMMARY, "mysummary");
-
TracTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
ITracClient client = connector.getClientManager().getTracClient(repository);
assertEquals(client.getAccessMode().name(), repository.getVersion());
+
+ // prepare task data
+ TracTicket ticket = new TracTicket(456);
+ ticket.putBuiltinValue(Key.SUMMARY, "mysummary");
TaskData taskData = taskDataHandler.createTaskDataFromTicket(client, repository, ticket, null);
+
ITask task = TasksUi.getRepositoryModel().createTask(repository, taskData.getTaskId());
+ task.setPriority("P1");
+ // create task from task data
connector.updateTaskFromTaskData(repository, task, taskData);
assertEquals(repository.getRepositoryUrl() + ITracClient.TICKET_URL + "456", task.getUrl());
assertEquals("456", task.getTaskKey());
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 e4c75bf1a..fa430809e 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
@@ -93,6 +93,8 @@ public class TracTaskDataHandlerXmlRpcTest extends TestCase {
public void testMarkStaleTasks() throws Exception {
SynchronizationSession session;
+ // sleep for one second to ensure that the created ticket has a unique time stamp
+ Thread.sleep(1000);
TracTicket ticket = TracTestUtil.createTicket(client, "markStaleTasks");
ITask task = TracTestUtil.createTask(repository, ticket.getId() + "");
long lastModified = TracUtil.toTracTime(task.getModificationDate());

Back to the top