Skip to content

Commit 0b3c2b8

Browse files
Some clean-up
1 parent 1e0319b commit 0b3c2b8

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

src/org/sosy_lab/java_smt/test/SolverThreadLocalityTest.java

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@
1818
import java.util.concurrent.Future;
1919
import java.util.concurrent.TimeUnit;
2020
import org.junit.Test;
21-
import org.sosy_lab.common.ShutdownManager;
22-
import org.sosy_lab.common.ShutdownNotifier;
23-
import org.sosy_lab.common.configuration.Configuration;
2421
import org.sosy_lab.common.configuration.InvalidConfigurationException;
25-
import org.sosy_lab.common.log.LogManager;
26-
import org.sosy_lab.java_smt.SolverContextFactory;
2722
import org.sosy_lab.java_smt.SolverContextFactory.Solvers;
2823
import org.sosy_lab.java_smt.api.BasicProverEnvironment;
2924
import org.sosy_lab.java_smt.api.BooleanFormula;
@@ -53,7 +48,8 @@ public void allLocalTest() throws InterruptedException, SolverException {
5348

5449
@SuppressWarnings("resource")
5550
@Test
56-
public void nonlocalContext() throws ExecutionException, InterruptedException, SolverException {
51+
public void nonlocalContextTest()
52+
throws ExecutionException, InterruptedException, SolverException {
5753
requireIntegers();
5854

5955
assume().that(solverToUse()).isNotEqualTo(Solvers.CVC5);
@@ -62,17 +58,7 @@ public void nonlocalContext() throws ExecutionException, InterruptedException, S
6258
executor.submit(
6359
() -> {
6460
try {
65-
Configuration newConfig =
66-
Configuration.builder()
67-
.setOption("solver.solver", solverToUse().toString())
68-
.build();
69-
70-
LogManager newLogger = LogManager.createTestLogManager();
71-
ShutdownNotifier newShutdownNotifier = ShutdownManager.create().getNotifier();
72-
73-
SolverContextFactory newFactory =
74-
new SolverContextFactory(newConfig, newLogger, newShutdownNotifier);
75-
return newFactory.generateContext();
61+
return factory.generateContext();
7662
} catch (InvalidConfigurationException e) {
7763
throw new RuntimeException(e);
7864
}
@@ -185,7 +171,9 @@ public void nonlocalProverTest() throws InterruptedException, ExecutionException
185171
}
186172

187173
@Override
188-
protected Logics logicToUse() { return Logics.QF_LIA; }
174+
protected Logics logicToUse() {
175+
return Logics.QF_LIA;
176+
}
189177

190178
// Make sure that the solver returned a valid interpolant for the two formulas
191179
private void checkInterpolant(

0 commit comments

Comments
 (0)