Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2014-03-13 06:00:03 +0000
committerMarc-Andre Laperle2014-03-13 06:00:03 +0000
commitc221d768ac73d56e3dcb7da6ca936198174f65db (patch)
tree13287aacf4c6195d4b8053c169103be01a109ecc /core/org.eclipse.cdt.core.tests/misc
parentf6fcccfcad081f70a4a9ac7b45146d0ad9e4ffae (diff)
downloadorg.eclipse.cdt-c221d768ac73d56e3dcb7da6ca936198174f65db.tar.gz
org.eclipse.cdt-c221d768ac73d56e3dcb7da6ca936198174f65db.tar.xz
org.eclipse.cdt-c221d768ac73d56e3dcb7da6ca936198174f65db.zip
Always run CDescriptorTests methods in the same order
It appears this class was not written to with random test ordering in mind. This should fix some of the intermittent test failures. Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Diffstat (limited to 'core/org.eclipse.cdt.core.tests/misc')
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorTests.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorTests.java
index 648c7a5a0a..ff48eb033c 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorTests.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorTests.java
@@ -16,7 +16,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
-import java.lang.reflect.Method;
import junit.extensions.TestSetup;
import junit.framework.Test;
@@ -64,11 +63,22 @@ public class CDescriptorTests extends BaseTestCase {
public static Test suite() {
TestSuite suite = new TestSuite(CDescriptorTests.class.getName());
- // Add all the tests in this class
- for (Method m : CDescriptorTests.class.getMethods()) {
- if (m.getName().startsWith("test"))
- suite.addTest(new CDescriptorTests(m.getName()));
- }
+ // Always run the tests in the same order because they were not written with random order in mind.
+ suite.addTest(new CDescriptorTests("testDescriptorCreation"));
+ suite.addTest(new CDescriptorTests("testDescriptorOwner"));
+ suite.addTest(new CDescriptorTests("testConcurrentDescriptorModification"));
+ suite.addTest(new CDescriptorTests("testConcurrentDifferentStorageElementModification"));
+ suite.addTest(new CDescriptorTests("testConcurrentSameStorageElementModification"));
+ suite.addTest(new CDescriptorTests("testDeadlockDuringProjectCreation"));
+ suite.addTest(new CDescriptorTests("testDescriptorConversion"));
+ suite.addTest(new CDescriptorTests("testExtensionCreation"));
+ suite.addTest(new CDescriptorTests("testExtensionGet"));
+ suite.addTest(new CDescriptorTests("testExtensionData"));
+ suite.addTest(new CDescriptorTests("testExtensionRemove"));
+ suite.addTest(new CDescriptorTests("testProjectDataCreate"));
+ suite.addTest(new CDescriptorTests("testProjectDataDelete"));
+ suite.addTest(new CDescriptorTests("testCProjectDescriptionDescriptorInteraction"));
+ suite.addTest(new CDescriptorTests("testAccumulatingBlankLinesInProjectData"));
TestSetup wrapper = new TestSetup(suite) {
@Override

Back to the top