Skip to content

Commit

Permalink
Remove local test support from SessionTestSuite eclipse-platform#903
Browse files Browse the repository at this point in the history
The SessionTestSuite currently supports local test execution. However,
this functionality is unused and only introduces unnecessary complexity
to the session test framework.

Contributes to
eclipse-platform#903
  • Loading branch information
HeikoKlare committed May 15, 2024
1 parent f7d0e64 commit 6cb771e
Showing 1 changed file with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public class SessionTestSuite extends TestSuite {
public static final String UI_TEST_APPLICATION = "org.eclipse.pde.junit.runtime.uitestapplication"; //$NON-NLS-1$
protected String applicationId = CORE_TEST_APPLICATION;
private final Set<TestCase> crashTests = new HashSet<>();
private final Set<TestCase> localTests = new HashSet<>();
// the id for the plug-in whose classloader ought to be used to load the test case class
protected String pluginId;
private Setup setup;
Expand Down Expand Up @@ -62,14 +61,6 @@ public void addCrashTest(TestCase test) {
super.addTest(test);
}

/**
* Adds a local test, a test that is run locally, not in a separate session.
*/
public void addLocalTest(TestCase test) {
localTests.add(test);
super.addTest(test);
}

protected void fillTestDescriptor(TestDescriptor test) throws SetupException {
if (test.getApplicationId() == null) {
test.setApplicationId(applicationId);
Expand Down Expand Up @@ -116,11 +107,6 @@ protected Test[] getTests(boolean sort) {
return allTests;
}

private boolean isLocalTest(Test test) {
return localTests.contains(test);
}


protected Setup newSetup() throws SetupException {
Setup base = SetupManager.getInstance().getDefaultSetup();
base.setSystemProperty("org.eclipse.update.reconcile", "false"); //$NON-NLS-1$ //$NON-NLS-2$
Expand All @@ -142,12 +128,7 @@ public final void runTest(Test test, TestResult result) {
if (test instanceof TestDescriptor) {
runSessionTest((TestDescriptor) test, result);
} else if (test instanceof TestCase) {
if (isLocalTest(test)) {
// local, ordinary test - just run it
test.run(result);
} else {
runSessionTest(new TestDescriptor((TestCase) test), result);
}
runSessionTest(new TestDescriptor((TestCase) test), result);
} else if (test instanceof TestSuite) {
// find and run the test cases that make up the suite
runTestSuite((TestSuite) test, result);
Expand Down

0 comments on commit 6cb771e

Please sign in to comment.