Permalink
Browse files

cleanup thread references

  • Loading branch information...
1 parent 865e00b commit e48f6d40bf755dba2da4c29a4b7e763637b61738 @Tibor17 committed Sep 21, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/test/java/org/junit/tests/experimental/parallel/ParallelClassTest.java
@@ -9,6 +9,7 @@
import org.junit.experimental.ParallelComputer;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
+import org.junit.Before;
public class ParallelClassTest {
@@ -34,6 +35,13 @@
}
}
+ @Before public void cleanupReferences() {
+ fExample1One= null;
+ fExample1Two= null;
+ fExample2One= null;
+ fExample2Two= null;
+ }
+
@Test public void testsRunInParallel() {
Result result= JUnitCore.runClasses(ParallelComputer.classes(), Example1.class, Example2.class);
assertTrue(result.wasSuccessful());
@@ -44,9 +52,5 @@
assertThat(fExample1One, is(fExample1Two));
assertThat(fExample2One, is(fExample2Two));
assertThat(fExample1One, is(not(fExample2One)));
- fExample1One= null;
- fExample1Two= null;
- fExample2One= null;
- fExample2Two= null;
}
}

0 comments on commit e48f6d4

Please sign in to comment.