Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-10-14 13:49:16 +0000
committerSteffen Pingel2011-10-14 13:49:16 +0000
commitbe91008417471f686d8b2f55481159d2173f1ff0 (patch)
tree305030a5028c99f89b15d07e5a8b62db94342b15 /org.eclipse.mylyn.bugzilla.tests
parent3123275438c2aa4402b1aaa1763c51846902459d (diff)
downloadorg.eclipse.mylyn.tasks-be91008417471f686d8b2f55481159d2173f1ff0.tar.gz
org.eclipse.mylyn.tasks-be91008417471f686d8b2f55481159d2173f1ff0.tar.xz
org.eclipse.mylyn.tasks-be91008417471f686d8b2f55481159d2173f1ff0.zip
ASSIGNED - bug 359976: rework of some Bugzilla Test
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359976 Change-Id: I3c2f230e4755f2d38709ae4f8c5cdab9a6f7cdd8
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java22
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java23
2 files changed, 16 insertions, 29 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 40cf0fd11..7d9882b59 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
@@ -7,6 +7,7 @@
*
* Contributors:
* Tasktop Technologies - initial API and implementation
+ * Frank Becker - improvements
*******************************************************************************/
package org.eclipse.mylyn.bugzilla.tests;
@@ -28,15 +29,15 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaVersion;
/**
* @author Steffen Pingel
* @author Thomas Ehrnhoefer
+ * @author Frank Becker
*/
public class AllBugzillaHeadlessStandaloneTests {
public static Test suite() {
- String[] empty = { "" };
- return suite(false, empty);
+ return suite(false);
}
- public static Test suite(boolean defaultOnly, String[] excludeFixtureArray) {
+ public static Test suite(boolean defaultOnly) {
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);
@@ -47,17 +48,6 @@ public class AllBugzillaHeadlessStandaloneTests {
addTests(suite, BugzillaFixture.DEFAULT);
} else {
for (BugzillaFixture fixture : BugzillaFixture.ALL) {
- String fixtureURL = fixture.getRepositoryUrl();
- boolean excludeFound = false;
- for (String excludeFixtureURL : excludeFixtureArray) {
- if (excludeFixtureURL.equals(fixtureURL)) {
- excludeFound = true;
- break;
- }
- }
- if (excludeFound) {
- continue;
- }
addTests(suite, fixture);
}
}
@@ -65,6 +55,10 @@ public class AllBugzillaHeadlessStandaloneTests {
}
protected static void addTests(TestSuite suite, BugzillaFixture fixture) {
+ if (fixture.isExcluded()) {
+ return;
+ }
+
fixture.createSuite(suite);
// XXX: re-enable when webservice is used for retrieval of history
// fixture.add(fixtureSuite, BugzillaTaskHistoryTest.class);
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 4501fd8a0..a5583f6dd 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
@@ -7,6 +7,7 @@
*
* Contributors:
* Tasktop Technologies - initial API and implementation
+ * Frank Becker - improvements
*******************************************************************************/
package org.eclipse.mylyn.bugzilla.tests;
@@ -26,6 +27,8 @@ import org.eclipse.mylyn.tests.util.TestUtil;
/**
* @author Mik Kersten
+ * @author Steffen Pingel
+ * @author Frank Becker
*/
public class AllBugzillaTests {
@@ -42,11 +45,8 @@ public class AllBugzillaTests {
}
private static void addTests(boolean defaultOnly, TestSuite suite) {
- String excludeFixture = System.getProperty("mylyn.test.exclude", "");
- String[] excludeFixtureArray = excludeFixture.split(",");
-
// Standalone tests (Don't require an instance of Eclipse)
- suite.addTest(AllBugzillaHeadlessStandaloneTests.suite(defaultOnly, excludeFixtureArray));
+ suite.addTest(AllBugzillaHeadlessStandaloneTests.suite(defaultOnly));
// Tests that only need to run once (i.e. no network io so doesn't matter which repository)
suite.addTestSuite(TaskEditorTest.class);
@@ -62,23 +62,16 @@ public class AllBugzillaTests {
addTests(suite, BugzillaFixture.DEFAULT);
} else {
for (BugzillaFixture fixture : BugzillaFixture.ALL) {
- String fixtureURL = fixture.getRepositoryUrl();
- boolean excludeFound = false;
- for (String excludeFixtureURL : excludeFixtureArray) {
- if (excludeFixtureURL.equals(fixtureURL)) {
- excludeFound = true;
- break;
- }
- }
- if (excludeFound) {
- continue;
- }
addTests(suite, fixture);
}
}
}
private static void addTests(TestSuite suite, BugzillaFixture fixture) {
+ if (fixture.isExcluded()) {
+ return;
+ }
+
fixture.createSuite(suite);
fixture.add(RepositoryReportFactoryTest.class);
fixture.add(BugzillaTaskDataHandlerTest.class);

Back to the top