Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-02-23 03:02:34 +0000
committerspingel2010-02-23 03:02:34 +0000
commitd43ad78755c0357f9155bb49c16229f609f40c74 (patch)
tree9743d6c4ff6ed447382fd2655c1eb0060781c6e1 /org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac
parent896a0d440693a659d1e8e57d8bcbdb538194a7e6 (diff)
downloadorg.eclipse.mylyn.tasks-d43ad78755c0357f9155bb49c16229f609f40c74.tar.gz
org.eclipse.mylyn.tasks-d43ad78755c0357f9155bb49c16229f609f40c74.tar.xz
org.eclipse.mylyn.tasks-d43ad78755c0357f9155bb49c16229f609f40c74.zip
NEW - bug 302792: Trac tests spuriously fail with authentication errors
https://bugs.eclipse.org/bugs/show_bug.cgi?id=302792
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/core/TracTaskDataHandlerXmlRpcTest.java16
1 files changed, 6 insertions, 10 deletions
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 cbf21f4ac..ed6865965 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
@@ -92,11 +92,6 @@ public class TracTaskDataHandlerXmlRpcTest extends TestCase {
}
public void testMarkStaleTasks() throws Exception {
- // FIXME 3.4 re-enable test
- if (TracFixture.current().getVersion().compareTo("0.12") >= 0) {
- return;
- }
-
SynchronizationSession session;
TracTicket ticket = TracTestUtil.createTicket(client, "markStaleTasks");
ITask task = TracTestUtil.createTask(repository, ticket.getId() + "");
@@ -119,11 +114,11 @@ public class TracTaskDataHandlerXmlRpcTest extends TestCase {
repository.setSynchronizationTimeStamp(lastModified + "");
session = createSession(task);
connector.preSynchronization(session, null);
- // TODO this was fixed so it returns false now but only if the
- // query returns a single task
+ // false since query that check for changed tasks only returns a single task
assertFalse(session.needsPerformQueries());
assertEquals(Collections.emptySet(), session.getStaleTasks());
+ // nothing has changed, should detect a change
repository.setSynchronizationTimeStamp((lastModified + 1) + "");
session = createSession(task);
connector.preSynchronization(session, null);
@@ -137,7 +132,8 @@ public class TracTaskDataHandlerXmlRpcTest extends TestCase {
client.updateTicket(ticket, "comment", null);
TracTicket updateTicket = client.getTicket(ticket.getId(), null);
mostRecentlyModified = TracUtil.toTracTime(updateTicket.getLastChanged());
- if (mostRecentlyModified > lastModified) {
+ // needs to be at least one second ahead of repository time stamp
+ if (mostRecentlyModified > lastModified + 1) {
break;
} else if (i == 2) {
fail("Failed to update ticket modification time: ticket id=" + ticket.getId() + ", lastModified="
@@ -146,8 +142,8 @@ public class TracTaskDataHandlerXmlRpcTest extends TestCase {
Thread.sleep(1500);
}
- //repository.setSynchronizationTimeStamp((lastModified + 1) + "");
- repository.setSynchronizationTimeStamp((mostRecentlyModified - 1) + "");
+ // should now detect a change
+ repository.setSynchronizationTimeStamp((lastModified + 1) + "");
session = createSession(task);
connector.preSynchronization(session, null);
assertTrue("Expected change: ticket id=" + ticket.getId() + ", lastModified=" + lastModified

Back to the top