Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-09-30 21:45:39 +0000
committerspingel2009-09-30 21:45:39 +0000
commitb82505e9797d1ab99067ebf61a153cc9a31b5485 (patch)
treea80d9580b72a8e1b4a181ab8e725c6d1c4b7a7cc /org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac
parent3f436f48ffb8dd246b89d7148e6232b88018864f (diff)
downloadorg.eclipse.mylyn.tasks-b82505e9797d1ab99067ebf61a153cc9a31b5485.tar.gz
org.eclipse.mylyn.tasks-b82505e9797d1ab99067ebf61a153cc9a31b5485.tar.xz
org.eclipse.mylyn.tasks-b82505e9797d1ab99067ebf61a153cc9a31b5485.zip
REOPENED - bug 267508: fix and speed up JiraFilterTest
https://bugs.eclipse.org/bugs/show_bug.cgi?id=267508
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/support/TracFixture.java24
1 files changed, 10 insertions, 14 deletions
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 975e2aa0a..b06672ff0 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
@@ -13,12 +13,8 @@ package org.eclipse.mylyn.trac.tests.support;
import java.net.Proxy;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
import org.eclipse.mylyn.commons.net.IProxyProvider;
import org.eclipse.mylyn.commons.net.WebLocation;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.trac.core.TracClientFactory;
import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
@@ -202,21 +198,21 @@ public class TracFixture extends TestFixture {
@Override
public TaskRepository singleRepository() {
TracCorePlugin.getDefault().getConnector().getClientManager().writeCache();
- TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
- manager.clearRepositories();
+ TaskRepository repository = super.singleRepository();
+ TracCorePlugin.getDefault().getConnector().getClientManager().readCache();
+ return repository;
+ }
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
- TaskRepository repository = new TaskRepository(TracCorePlugin.CONNECTOR_KIND, repositoryUrl);
- repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.username,
- credentials.password), false);
+ @Override
+ protected void configureRepository(TaskRepository repository) {
repository.setTimeZoneId(ITracClient.TIME_ZONE);
repository.setCharacterEncoding(ITracClient.CHARSET);
repository.setVersion(accessMode.name());
+ }
- manager.addRepository(repository);
- TracCorePlugin.getDefault().getConnector().getClientManager().readCache();
-
- return repository;
+ @Override
+ protected void resetRepositories() {
+ TracCorePlugin.getDefault().getConnector().getClientManager().clearClients();
}
// private static void initializeRepository(XmlRpcServer server) throws Exception {

Back to the top