Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-06-25 01:07:16 -0400
committerspingel2010-06-25 01:07:16 -0400
commit03f43230dcd71b7ad9123be75a1bcee06e114522 (patch)
tree305c3ed293ecbb82ece9d52e7803e01b51f457f0
parent17c7d538593c6cb8d544b6c7aa2ce22940d6507b (diff)
downloadorg.eclipse.mylyn.tasks-03f43230dcd71b7ad9123be75a1bcee06e114522.tar.gz
org.eclipse.mylyn.tasks-03f43230dcd71b7ad9123be75a1bcee06e114522.tar.xz
org.eclipse.mylyn.tasks-03f43230dcd71b7ad9123be75a1bcee06e114522.zip
RESOLVED - bug 317903: tests log too much output
https://bugs.eclipse.org/bugs/show_bug.cgi?id=317903
-rw-r--r--org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestFixture.java3
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java17
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracWebClient.java7
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java6
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java1
5 files changed, 14 insertions, 20 deletions
diff --git a/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestFixture.java b/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestFixture.java
index 865b7a880..a78f42252 100644
--- a/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestFixture.java
+++ b/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestFixture.java
@@ -168,7 +168,6 @@ public abstract class TestFixture {
public AbstractWebLocation location(PrivilegeLevel level, Proxy proxy) throws Exception {
Credentials credentials = TestUtil.readCredentials(level);
- System.err.println(" Read credentials: " + credentials + " (" + level + ")"); //$NON-NLS-1$
return location(credentials.username, credentials.password, proxy);
}
@@ -187,7 +186,6 @@ public abstract class TestFixture {
public TaskRepository repository() {
TaskRepository repository = new TaskRepository(connectorKind, repositoryUrl);
Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
- System.err.println(" Read credentials: " + credentials); //$NON-NLS-1$
repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.username,
credentials.password), false);
return repository;
@@ -213,7 +211,6 @@ public abstract class TestFixture {
TaskRepository repository = new TaskRepository(connectorKind, repositoryUrl);
Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
- System.err.println(" Read credentials: " + credentials); //$NON-NLS-1$
repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.username,
credentials.password), true);
configureRepository(repository);
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 52c1565ef..179793777 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,14 +28,13 @@ 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;
import org.eclipse.mylyn.internal.trac.core.client.AbstractWikiHandler;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.client.ITracWikiClient;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
+import org.eclipse.mylyn.internal.trac.core.client.ITracWikiClient;
import org.eclipse.mylyn.internal.trac.core.model.TracPriority;
import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
@@ -43,10 +42,10 @@ import org.eclipse.mylyn.internal.trac.core.util.TracUtil;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITask;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.TaskRepositoryLocationFactory;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
@@ -574,9 +573,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(): since=" + since.getTime() + ",changed=" + ids); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// if (CoreUtil.TEST_MODE) {
+// System.err.println(" preSynchronization(): since=" + since.getTime() + ",changed=" + ids); //$NON-NLS-1$ //$NON-NLS-2$
+// }
if (ids.isEmpty()) {
// repository is unchanged
session.setNeedsPerformQueries(false);
@@ -590,9 +589,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 (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.core/src/org/eclipse/mylyn/internal/trac/core/client/TracWebClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracWebClient.java
index 3d661f934..5a0bc5e9a 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracWebClient.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracWebClient.java
@@ -40,7 +40,6 @@ 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.core.StatusHandler;
import org.eclipse.mylyn.commons.net.AbstractWebLocation;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
@@ -145,9 +144,9 @@ public class TracWebClient extends AbstractTracClient {
Credentials httpCredentials = WebUtil.getHttpClientCredentials(credentials,
WebUtil.getHost(repositoryUrl));
httpClient.getState().setCredentials(authScope, httpCredentials);
- if (CoreUtil.TEST_MODE) {
- System.err.println(" Setting credentials: " + httpCredentials); //$NON-NLS-1$
- }
+// if (CoreUtil.TEST_MODE) {
+// System.err.println(" Setting credentials: " + httpCredentials); //$NON-NLS-1$
+// }
GetMethod method = new GetMethod(WebUtil.getRequestPath(repositoryUrl + LOGIN_URL));
method.setFollowRedirects(false);
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java
index deb53e8b7..45e0110e5 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java
@@ -330,9 +330,9 @@ public class TracXmlRpcClient extends AbstractTracClient implements ITracWikiCli
Credentials httpCredentials = WebUtil.getHttpClientCredentials(credentials,
WebUtil.getHost(location.getUrl()));
httpClient.getState().setCredentials(authScope, httpCredentials);
- if (CoreUtil.TEST_MODE) {
- System.err.println(" Setting credentials: " + httpCredentials); //$NON-NLS-1$
- }
+// if (CoreUtil.TEST_MODE) {
+// System.err.println(" Setting credentials: " + httpCredentials); //$NON-NLS-1$
+// }
httpClient.getState().setCredentials(authScope, httpCredentials);
} else {
httpClient.getState().clearCredentials();
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 a6f4d7e8b..9ac49b79d 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
@@ -187,7 +187,6 @@ public class TracFixture extends TestFixture {
public ITracClient connect(String url, Proxy proxy, PrivilegeLevel level) throws Exception {
Credentials credentials = TestUtil.readCredentials(level);
- System.err.println(" Read credentials: " + credentials + " (" + level + ")"); //$NON-NLS-1$
return connect(url, credentials.username, credentials.password, proxy);
}

Back to the top