diff options
2 files changed, 7 insertions, 2 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/TckFixture.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/TckFixture.java index 5752089b2..21ac642a4 100644 --- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/TckFixture.java +++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/TckFixture.java @@ -9,6 +9,8 @@ public class TckFixture extends AbstractTestFixture { private final FixtureConfiguration config; + protected TaskRepository repository; + public TckFixture(FixtureConfiguration config) { super("org.eclipse.mylyn.bugzilla.rest", config); this.config = config; @@ -25,7 +27,10 @@ public class TckFixture extends AbstractTestFixture { } public TaskRepository repository() { - return new TaskRepository(getConnectorKind(), getRepositoryUrl()); + if (repository == null) { + repository = new TaskRepository(getConnectorKind(), getRepositoryUrl()); + } + return repository; } @SuppressWarnings("restriction") diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ValidationTest.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ValidationTest.java index 57c0e17c6..2e1b7fb9d 100644 --- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ValidationTest.java +++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ValidationTest.java @@ -42,7 +42,7 @@ public class ValidationTest extends AbstractTckTest { org.eclipse.mylyn.commons.net.AuthenticationCredentials invalideCreds = new org.eclipse.mylyn.commons.net.AuthenticationCredentials( "invalidateCredentials", "invalidateCredentials"); repository.setCredentials(org.eclipse.mylyn.commons.net.AuthenticationType.REPOSITORY, invalideCreds, true); - fixture().connector().validateRepository(fixture().repository(), monitor); + fixture().connector().validateRepository(repository, monitor); } } |