Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-02-22 06:23:44 +0000
committerspingel2010-02-22 06:23:44 +0000
commitb0fd2fd567e41d04d6cf89bb003242e6c6e9c71e (patch)
tree2cc6d4fcea9a4cb01e7f484e96d6f715d4dce517
parent5d2bd334035c0da30f214b8de64d3f2a3c408a4a (diff)
downloadorg.eclipse.mylyn.tasks-b0fd2fd567e41d04d6cf89bb003242e6c6e9c71e.tar.gz
org.eclipse.mylyn.tasks-b0fd2fd567e41d04d6cf89bb003242e6c6e9c71e.tar.xz
org.eclipse.mylyn.tasks-b0fd2fd567e41d04d6cf89bb003242e6c6e9c71e.zip
NEW - bug 302792: Trac tests spuriously fail with authentication errors
https://bugs.eclipse.org/bugs/show_bug.cgi?id=302792
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java7
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracTaskDataHandlerXmlRpcTest.java2
2 files changed, 8 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
index 535522aef..5fc6b0195 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
@@ -28,6 +28,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
+import org.eclipse.mylyn.commons.core.CoreUtil;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
import org.eclipse.mylyn.commons.net.Policy;
@@ -573,6 +574,9 @@ public class TracRepositoryConnector extends AbstractRepositoryConnector {
try {
ITracClient client = getClientManager().getTracClient(repository);
Set<Integer> ids = client.getChangedTickets(since, monitor);
+ if (CoreUtil.TEST_MODE) {
+ System.err.println(" preSynchronization(): changed=" + ids); //$NON-NLS-1$
+ }
if (ids.isEmpty()) {
// repository is unchanged
session.setNeedsPerformQueries(false);
@@ -586,6 +590,9 @@ public class TracRepositoryConnector extends AbstractRepositoryConnector {
// most recent modification date
Integer id = ids.iterator().next();
Date lastChanged = client.getTicketLastChanged(id, monitor);
+ if (CoreUtil.TEST_MODE) {
+ System.err.println(" preSynchronization(): since=" + since.getTime() + ", lastChanged=" + lastChanged.getTime()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
if (since.equals(lastChanged)) {
// repository didn't actually change
session.setNeedsPerformQueries(false);
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 e19d0dacd..ae5524f5f 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
@@ -142,7 +142,7 @@ public class TracTaskDataHandlerXmlRpcTest extends TestCase {
}
//repository.setSynchronizationTimeStamp((lastModified + 1) + "");
- repository.setSynchronizationTimeStamp(mostRecentlyModified + "");
+ repository.setSynchronizationTimeStamp((mostRecentlyModified - 1) + "");
session = createSession(task);
connector.preSynchronization(session, null);
assertTrue("Expected change: ticket id=" + ticket.getId() + ", lastModified=" + lastModified

Back to the top