File tree 1 file changed +14
-1
lines changed
src/org/sosy_lab/java_smt/test
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 17
17
import java .util .concurrent .Executors ;
18
18
import java .util .concurrent .Future ;
19
19
import java .util .concurrent .TimeUnit ;
20
+ import org .junit .After ;
21
+ import org .junit .Before ;
20
22
import org .junit .Test ;
21
23
import org .sosy_lab .common .configuration .InvalidConfigurationException ;
22
24
import org .sosy_lab .java_smt .SolverContextFactory .Solvers ;
32
34
import org .sosy_lab .java_smt .solvers .opensmt .Logics ;
33
35
34
36
public class SolverThreadLocalityTest extends SolverBasedTest0 .ParameterizedSolverBasedTest0 {
35
- ExecutorService executor = Executors .newFixedThreadPool (2 );
37
+ private ExecutorService executor ;
38
+
39
+ @ Before
40
+ public void makeThreads () {
41
+ executor = Executors .newFixedThreadPool (2 );
42
+ }
43
+
44
+ @ After
45
+ public void releaseThreads () {
46
+ // All threads should have terminated by now as we always wait in the test cases
47
+ executor .shutdownNow ();
48
+ }
36
49
37
50
@ Test
38
51
public void allLocalTest () throws InterruptedException , SolverException {
You can’t perform that action at this time.
0 commit comments