diff options
Diffstat (limited to 'model-data/src/test/java/org/eclipse/viatra/solver/data/map/tests/smoke/slow/SlowSmokeTest.java')
-rw-r--r-- | model-data/src/test/java/org/eclipse/viatra/solver/data/map/tests/smoke/slow/SlowSmokeTest.java | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/model-data/src/test/java/org/eclipse/viatra/solver/data/map/tests/smoke/slow/SlowSmokeTest.java b/model-data/src/test/java/org/eclipse/viatra/solver/data/map/tests/smoke/slow/SlowSmokeTest.java new file mode 100644 index 00000000..004d30d9 --- /dev/null +++ b/model-data/src/test/java/org/eclipse/viatra/solver/data/map/tests/smoke/slow/SlowSmokeTest.java | |||
@@ -0,0 +1,77 @@ | |||
1 | package org.eclipse.viatra.solver.data.map.tests.smoke.slow; | ||
2 | |||
3 | import java.util.Arrays; | ||
4 | import java.util.stream.Stream; | ||
5 | |||
6 | import org.eclipse.viatra.solver.data.map.tests.smoke.fast.CommitSmokeTest; | ||
7 | import org.eclipse.viatra.solver.data.map.tests.smoke.fast.MutableImmutableCompareSmokeTest; | ||
8 | import org.eclipse.viatra.solver.data.map.tests.smoke.fast.MutableSmokeTest; | ||
9 | import org.eclipse.viatra.solver.data.map.tests.smoke.fast.RestoreSmokeTest; | ||
10 | import org.junit.jupiter.api.Disabled; | ||
11 | import org.junit.jupiter.params.ParameterizedTest; | ||
12 | import org.junit.jupiter.params.provider.Arguments; | ||
13 | import org.junit.jupiter.params.provider.MethodSource; | ||
14 | |||
15 | @Disabled | ||
16 | public class SlowSmokeTest { | ||
17 | |||
18 | private static int slowStepCount = 32 * 32 * 32 * 32; | ||
19 | |||
20 | private static Stream<Arguments> changeStepCount(Stream<Arguments> arguments) { | ||
21 | return arguments.map(x -> Arguments.of(updatedStepCount(x.get()))); | ||
22 | |||
23 | } | ||
24 | |||
25 | private static Object[] updatedStepCount(Object[] arguments) { | ||
26 | Object[] copy = Arrays.copyOf(arguments, arguments.length); | ||
27 | copy[1] = slowStepCount; | ||
28 | return copy; | ||
29 | } | ||
30 | |||
31 | @ParameterizedTest(name = "Mutable Smoke {index}/{0} Steps={1} Keys={2} Values={3} seed={4} evil-hash={5}") | ||
32 | @MethodSource | ||
33 | void smoke1(int test, int steps, int noKeys, int noValues, int seed, boolean evilHash) { | ||
34 | (new MutableSmokeTest()).runSmokeTest( | ||
35 | "SmokeS" + steps + "K" + noKeys + "V" + noValues + "s" + seed + "H" + (evilHash ? "Evil" : "Normal"), | ||
36 | seed, steps, noKeys, noValues, evilHash); | ||
37 | } | ||
38 | |||
39 | private static Stream<Arguments> smoke1() { | ||
40 | return changeStepCount(MutableSmokeTest.parametrizedSmoke()); | ||
41 | } | ||
42 | |||
43 | @ParameterizedTest(name = "Immutable Smoke {index}/{0} Steps={1} Keys={2} Values={3} commit frequency={4} seed={5} evil-hash={6}") | ||
44 | @MethodSource | ||
45 | void smoke2(int tests, int steps, int noKeys, int noValues, int commitFrequency, int seed, boolean evilHash) { | ||
46 | (new CommitSmokeTest()).runSmokeTest("SmokeCommitS" + steps + "K" + noKeys + "V" + noValues + "s" + seed, seed, | ||
47 | steps, noKeys, noValues, commitFrequency, evilHash); | ||
48 | } | ||
49 | |||
50 | private static Stream<Arguments> smoke2() { | ||
51 | return changeStepCount(CommitSmokeTest.parametrizedSmoke()); | ||
52 | } | ||
53 | |||
54 | @ParameterizedTest(name = "Mutable-Immutable Compare Smoke {index}/{0} Steps={1} Keys={2} Values={3} commit frequency={4} seed={5} evil-hash={6}") | ||
55 | @MethodSource | ||
56 | void smoke3(int tests, int steps, int noKeys, int noValues, int commitFrequency, int seed, boolean evilHash) { | ||
57 | (new MutableImmutableCompareSmokeTest()).runSmokeTest( | ||
58 | "SmokeMutableImmutableCompareS" + steps + "K" + noKeys + "V" + noValues + "s" + seed, seed, steps, | ||
59 | noKeys, noValues, commitFrequency, evilHash); | ||
60 | } | ||
61 | |||
62 | private static Stream<Arguments> smoke3() { | ||
63 | return changeStepCount(MutableImmutableCompareSmokeTest.parametrizedSmoke()); | ||
64 | } | ||
65 | |||
66 | @ParameterizedTest(name = "Mutable-Immutable Compare Smoke {index}/{0} Steps={1} Keys={2} Values={3} commit frequency={4} seed={5} evil-hash={6}") | ||
67 | @MethodSource | ||
68 | void smoke4(int tests, int steps, int noKeys, int noValues, int commitFrequency, int seed, boolean evilHash) { | ||
69 | (new RestoreSmokeTest()).runSmokeTest( | ||
70 | "SmokeMutableImmutableCompareS" + steps + "K" + noKeys + "V" + noValues + "s" + seed, seed, steps, | ||
71 | noKeys, noValues, commitFrequency, evilHash); | ||
72 | } | ||
73 | |||
74 | private static Stream<Arguments> smoke4() { | ||
75 | return changeStepCount(RestoreSmokeTest.parametrizedSmoke()); | ||
76 | } | ||
77 | } | ||