Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-02-22 02:09:47 +0000
committerspingel2010-02-22 02:09:47 +0000
commit8ed6bf15966c4f457f7e314c5f2cc478929fbf2b (patch)
tree367a1242bafda1d28119178ec102f05d3d7c0f40 /org.eclipse.mylyn.trac.tests/src
parentd1871b23acf711eae774dfe81a3e550ab41c69d4 (diff)
downloadorg.eclipse.mylyn.tasks-8ed6bf15966c4f457f7e314c5f2cc478929fbf2b.tar.gz
org.eclipse.mylyn.tasks-8ed6bf15966c4f457f7e314c5f2cc478929fbf2b.tar.xz
org.eclipse.mylyn.tasks-8ed6bf15966c4f457f7e314c5f2cc478929fbf2b.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')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracTaskDataHandlerXmlRpcTest.java15
1 files changed, 10 insertions, 5 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 45300a543..43e89b1ea 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
@@ -126,23 +126,28 @@ public class TracTaskDataHandlerXmlRpcTest extends TestCase {
assertFalse(session.needsPerformQueries());
assertEquals(Collections.emptySet(), session.getStaleTasks());
+ long mostRecentlyModified = 0;
// try changing ticket 3x to make sure it gets a new change time
for (int i = 0; i < 3; i++) {
ticket.putBuiltinValue(Key.DESCRIPTION, lastModified + "");
client.updateTicket(ticket, "comment", null);
TracTicket updateTicket = client.getTicket(ticket.getId(), null);
- if (updateTicket.getLastChanged().getTime() > lastModified) {
+ mostRecentlyModified = TracUtil.toTracTime(updateTicket.getLastChanged());
+ if (mostRecentlyModified > lastModified) {
break;
} else if (i == 2) {
- fail("Failed to update ticket modification time for ticket: " + ticket.getId());
+ fail("Failed to update ticket modification time: ticket id=" + ticket.getId() + ", lastModified="
+ + lastModified + ", mostRectentlyModified=" + mostRecentlyModified);
}
Thread.sleep(1500);
}
- repository.setSynchronizationTimeStamp((lastModified + 1) + "");
+ //repository.setSynchronizationTimeStamp((lastModified + 1) + "");
+ repository.setSynchronizationTimeStamp(mostRecentlyModified + "");
session = createSession(task);
connector.preSynchronization(session, null);
- assertTrue(session.needsPerformQueries());
+ assertTrue("Expected change: ticket id=" + ticket.getId() + ", lastModified=" + lastModified
+ + ", mostRectentlyModified=" + mostRecentlyModified, session.needsPerformQueries());
assertEquals(Collections.singleton(task), session.getStaleTasks());
}
@@ -360,7 +365,7 @@ public class TracTaskDataHandlerXmlRpcTest extends TestCase {
TaskData taskData = taskDataHandler.getTaskData(repository, "1", new NullProgressMonitor());
List<TaskAttribute> operations = taskData.getAttributeMapper().getAttributesByType(taskData,
TaskAttribute.TYPE_OPERATION);
- assertEquals((hasReassign ? 5 : 4), operations.size());
+ assertEquals("Unexpected operations: " + operations, (hasReassign ? 5 : 4), operations.size());
TaskOperation operation = taskData.getAttributeMapper().getTaskOperation(operations.get(0));
assertEquals(TaskAttribute.OPERATION, operation.getTaskAttribute().getId());

Back to the top