Update of /cvsroot/junit/junit/src/org/junit/tests
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv27005/src/org/junit/tests
Modified Files:
TimeoutTest.java AllTests.java
Log Message:
JUnitCore can run a class with a suite() method.
Index: TimeoutTest.java
===================================================================
RCS file: /cvsroot/junit/junit/src/org/junit/tests/TimeoutTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- TimeoutTest.java 6 Dec 2006 01:22:48 -0000 1.4
+++ TimeoutTest.java 13 Dec 2006 02:10:51 -0000 1.5
@@ -63,7 +63,8 @@
}
}
- @Ignore("was breaking gump") @Test public void timeoutFailure() throws Exception {
+ @Ignore("was breaking gump")
+ @Test public void timeoutFailure() throws Exception {
JUnitCore core= new JUnitCore();
Result result= core.run(TimeoutFailureTest.class);
assertEquals(1, result.getRunCount());
@@ -100,8 +101,11 @@
}
}
-
+ @Ignore("This breaks sporadically with time differences just slightly more than 200ms")
@Test public void infiniteLoopRunsForApproximatelyLengthOfTimeout() throws Exception {
+ // "prime the pump": running these beforehand makes the runtimes more predictable
+ // (because of class loading?)
+ JUnitCore.runClasses(InfiniteLoopTest.class, ImpatientLoopTest.class);
long longTime= runAndTime(InfiniteLoopTest.class);
long shortTime= runAndTime(ImpatientLoopTest.class);
long difference= longTime - shortTime;
Index: AllTests.java
===================================================================
RCS file: /cvsroot/junit/junit/src/org/junit/tests/AllTests.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- AllTests.java 6 Dec 2006 01:22:48 -0000 1.2
+++ AllTests.java 13 Dec 2006 02:10:51 -0000 1.3
@@ -39,7 +39,7 @@
OldTestClassRunnerTest.class,
JUnitCoreTest.class,
InaccessibleBaseClassTest.class,
-// SuiteMethodTest.class,
+ SuiteMethodTest.class,
TestClassMethodsRunnerTest.class
})
public class AllTests {
|