summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-03-01 15:25:25 (EST)
committer Steffen Pingel2012-03-01 15:25:25 (EST)
commitdeb07ff1d1b622389cab26906f64738e5697357e (patch)
tree9afa07694700874e076ff580fb69dbe5d1b2ae00
parent7c2d836a5bf03ddd2cc1dfa88c0b654f4bf8302a (diff)
downloadorg.eclipse.mylyn.tasks-deb07ff1d1b622389cab26906f64738e5697357e.zip
org.eclipse.mylyn.tasks-deb07ff1d1b622389cab26906f64738e5697357e.tar.gz
org.eclipse.mylyn.tasks-deb07ff1d1b622389cab26906f64738e5697357e.tar.bz2
NEW - bug 372971: setup integration tests on slave7
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372971 Change-Id: I8e938279552ea19c09c1e4a1a17d729a230f0471
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java15
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java31
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaDateTimeTests.java19
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaSearchPageTest.java1
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskEditorTest.java (renamed from org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/TaskEditorTest.java)2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java10
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java26
7 files changed, 45 insertions, 59 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java
index 4442543..9b5b9a7 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java
@@ -24,7 +24,7 @@ import org.eclipse.mylyn.bugzilla.tests.core.BugzillaRepositoryConnectorStandalo
import org.eclipse.mylyn.bugzilla.tests.core.BugzillaTaskCompletionTest;
import org.eclipse.mylyn.bugzilla.tests.core.BugzillaVersionTest;
import org.eclipse.mylyn.bugzilla.tests.support.BugzillaFixture;
-import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
+import org.eclipse.mylyn.commons.sdk.util.TestConfiguration;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaVersion;
/**
@@ -35,18 +35,19 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaVersion;
public class AllBugzillaHeadlessStandaloneTests {
public static Test suite() {
- return suite(false, CommonTestUtil.runHeartbeatTestsOnly());
+ return suite(TestConfiguration.getDefault());
}
- public static Test suite(boolean localOnly, boolean defaultOnly) {
+ public static Test suite(TestConfiguration configuration) {
TestSuite suite = new TestSuite(AllBugzillaHeadlessStandaloneTests.class.getName());
- // tests that only need to run once (i.e. no network i/o so doesn't matter which repository)
suite.addTestSuite(BugzillaConfigurationTest.class);
suite.addTestSuite(BugzillaVersionTest.class);
- suite.addTestSuite(BugzillaTaskCompletionTest.class);
- if (!localOnly) {
+ suite.addTestSuite(BugzillaDateTimeTests.class);
+ if (!configuration.isLocalOnly()) {
+ // network tests
+ suite.addTestSuite(BugzillaTaskCompletionTest.class);
// tests that run against all repository versions
- if (defaultOnly) {
+ if (configuration.isDefaultOnly()) {
addTests(suite, BugzillaFixture.DEFAULT);
} else {
for (BugzillaFixture fixture : BugzillaFixture.ALL) {
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
index c195f25..465e987 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
@@ -20,10 +20,10 @@ import org.eclipse.mylyn.bugzilla.tests.support.BugzillaFixture;
import org.eclipse.mylyn.bugzilla.tests.ui.BugzillaHyperlinkDetectorTest;
import org.eclipse.mylyn.bugzilla.tests.ui.BugzillaRepositorySettingsPageTest;
import org.eclipse.mylyn.bugzilla.tests.ui.BugzillaSearchPageTest;
+import org.eclipse.mylyn.bugzilla.tests.ui.BugzillaTaskEditorTest;
import org.eclipse.mylyn.bugzilla.tests.ui.BugzillaTaskHyperlinkDetectorTest;
-import org.eclipse.mylyn.bugzilla.tests.ui.TaskEditorTest;
-import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
import org.eclipse.mylyn.commons.sdk.util.ManagedTestSuite;
+import org.eclipse.mylyn.commons.sdk.util.TestConfiguration;
/**
* @author Mik Kersten
@@ -34,37 +34,30 @@ public class AllBugzillaTests {
public static Test suite() {
TestSuite suite = new ManagedTestSuite(AllBugzillaTests.class.getName());
- addTests(false, CommonTestUtil.runHeartbeatTestsOnly(), suite);
+ addTests(suite, TestConfiguration.getDefault());
return suite;
}
- public static Test suite(boolean defaultOnly) {
+ public static Test suite(TestConfiguration configuration) {
TestSuite suite = new TestSuite(AllBugzillaTests.class.getName());
- addTests(false, defaultOnly, suite);
+ addTests(suite, configuration);
return suite;
}
- public static Test localSuite() {
- TestSuite suite = new TestSuite(AllBugzillaTests.class.getName());
- addTests(true, CommonTestUtil.runHeartbeatTestsOnly(), suite);
- return suite;
- }
-
- private static void addTests(boolean localOnly, boolean defaultOnly, TestSuite suite) {
+ public static void addTests(TestSuite suite, TestConfiguration configuration) {
// Standalone tests (Don't require an instance of Eclipse)
- suite.addTest(AllBugzillaHeadlessStandaloneTests.suite(localOnly, defaultOnly));
+ suite.addTest(AllBugzillaHeadlessStandaloneTests.suite(configuration));
// Tests that only need to run once (i.e. no network io so doesn't matter which repository)
- suite.addTestSuite(TaskEditorTest.class);
- suite.addTestSuite(BugzillaRepositorySettingsPageTest.class);
- suite.addTestSuite(BugzillaSearchPageTest.class);
- suite.addTestSuite(BugzillaDateTimeTests.class);
suite.addTestSuite(BugzillaTaskHyperlinkDetectorTest.class);
suite.addTestSuite(BugzillaHyperlinkDetectorTest.class);
// network tests
- if (!localOnly) {
- if (defaultOnly) {
+ if (!configuration.isLocalOnly()) {
+ suite.addTestSuite(BugzillaTaskEditorTest.class);
+ suite.addTestSuite(BugzillaSearchPageTest.class);
+ suite.addTestSuite(BugzillaRepositorySettingsPageTest.class);
+ if (configuration.isDefaultOnly()) {
addTests(suite, BugzillaFixture.DEFAULT);
} else {
for (BugzillaFixture fixture : BugzillaFixture.ALL) {
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaDateTimeTests.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaDateTimeTests.java
index 6870d6d..3a66360 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaDateTimeTests.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaDateTimeTests.java
@@ -15,35 +15,31 @@ import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
-import org.eclipse.mylyn.bugzilla.tests.support.BugzillaFixture;
+import junit.framework.TestCase;
+
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttributeMapper;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
+import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tests.util.TestUtil.PrivilegeLevel;
/**
* @author Frank Becker
* @author Robert Elves
+ * @author Steffen Pingel
*/
-public class BugzillaDateTimeTests extends AbstractBugzillaTest {
+public class BugzillaDateTimeTests extends TestCase {
private TaskRepository repository;
private BugzillaRepositoryConnector connector;
- @SuppressWarnings("unused")
- private BugzillaClient client;
-
@Override
public void setUp() throws Exception {
- super.setUp();
- client = BugzillaFixture.current().client(PrivilegeLevel.USER);
- repository = BugzillaFixture.current().repository();
- connector = BugzillaFixture.current().connector();
+ repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, "http://mylyn.org");
+ connector = new BugzillaRepositoryConnector();
}
public void testDateFormatParsing() {
@@ -134,4 +130,5 @@ public class BugzillaDateTimeTests extends AbstractBugzillaTest {
TimeZone.setDefault(defaultTimeZone);
}
}
+
}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaSearchPageTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaSearchPageTest.java
index bdd7098..1f9f715 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaSearchPageTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaSearchPageTest.java
@@ -49,4 +49,5 @@ public class BugzillaSearchPageTest extends TestCase {
*/
assertFalse(page.getProductCount() == 0);
}
+
}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/TaskEditorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskEditorTest.java
index d9eeaee..ee7b999 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/TaskEditorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskEditorTest.java
@@ -27,7 +27,7 @@ import org.eclipse.ui.PlatformUI;
* @author Jeff Pound
* @author Steffen Pingel
*/
-public class TaskEditorTest extends TestCase {
+public class BugzillaTaskEditorTest extends TestCase {
private TaskRepository repository;
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
index 90206e9..f91121a 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
@@ -14,7 +14,7 @@ package org.eclipse.mylyn.trac.tests;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
+import org.eclipse.mylyn.commons.sdk.util.TestConfiguration;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
import org.eclipse.mylyn.trac.tests.client.TracClientFactoryTest;
import org.eclipse.mylyn.trac.tests.client.TracClientProxyTest;
@@ -32,10 +32,10 @@ import org.eclipse.mylyn.trac.tests.support.TracFixture;
public class AllTracHeadlessStandaloneTests {
public static Test suite() {
- return suite(false, CommonTestUtil.runHeartbeatTestsOnly());
+ return suite(TestConfiguration.getDefault());
}
- public static Test suite(boolean localOnly, boolean defaultOnly) {
+ public static Test suite(TestConfiguration configuration) {
TestSuite suite = new TestSuite(AllTracHeadlessStandaloneTests.class.getName());
// client tests
suite.addTestSuite(TracSearchTest.class);
@@ -45,8 +45,8 @@ public class AllTracHeadlessStandaloneTests {
// core tests
suite.addTestSuite(TracClientManagerTest.class);
// network tests
- if (!localOnly) {
- if (defaultOnly) {
+ if (!configuration.isLocalOnly()) {
+ if (configuration.isDefaultOnly()) {
addTests(suite, TracFixture.DEFAULT);
} else {
for (TracFixture fixture : TracFixture.ALL) {
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
index 1cb2322..e7262ff 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
@@ -14,8 +14,8 @@ package org.eclipse.mylyn.trac.tests;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
import org.eclipse.mylyn.commons.sdk.util.ManagedTestSuite;
+import org.eclipse.mylyn.commons.sdk.util.TestConfiguration;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
import org.eclipse.mylyn.trac.tests.core.TracAttachmentHandlerTest;
import org.eclipse.mylyn.trac.tests.core.TracRepositoryConnectorTest;
@@ -35,33 +35,27 @@ public class AllTracTests {
public static Test suite() {
TestSuite suite = new ManagedTestSuite(AllTracTests.class.getName());
- addTests(false, CommonTestUtil.runHeartbeatTestsOnly(), suite);
+ addTests(suite, TestConfiguration.getDefault());
return suite;
}
- public static Test suite(boolean defaultOnly) {
+ public static Test suite(TestConfiguration configuration) {
TestSuite suite = new TestSuite(AllTracTests.class.getName());
- addTests(false, defaultOnly, suite);
+ addTests(suite, configuration);
return suite;
}
- public static Test localSuite() {
- TestSuite suite = new TestSuite(AllTracTests.class.getName());
- addTests(true, CommonTestUtil.runHeartbeatTestsOnly(), suite);
- return suite;
- }
-
- private static void addTests(boolean localOnly, boolean defaultOnly, TestSuite suite) {
- suite.addTest(AllTracHeadlessStandaloneTests.suite(localOnly, defaultOnly));
+ public static void addTests(TestSuite suite, TestConfiguration configuration) {
+ suite.addTest(AllTracHeadlessStandaloneTests.suite(configuration));
suite.addTestSuite(TracUtilTest.class);
- suite.addTestSuite(TracRepositoryQueryTest.class);
// XXX fails when run from continuous build: suite.addTestSuite(TracTaskEditorTest.class);
- suite.addTestSuite(TracRepositorySettingsPageTest.class);
suite.addTestSuite(TracHyperlinkUtilTest.class);
- if (!localOnly) {
+ if (!configuration.isLocalOnly()) {
+ suite.addTestSuite(TracRepositoryQueryTest.class);
+ suite.addTestSuite(TracRepositorySettingsPageTest.class);
// network tests
- if (defaultOnly) {
+ if (configuration.isDefaultOnly()) {
addTests(suite, TracFixture.DEFAULT);
} else {
for (TracFixture fixture : TracFixture.ALL) {