mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
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>
This commit is contained in:
parent
f6fcccfcad
commit
c221d768ac
1 changed files with 16 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue