From f737ce01c3496686a702d13698eb34b4d936829c Mon Sep 17 00:00:00 2001 From: danglotb Date: Mon, 18 Nov 2019 15:06:08 +0100 Subject: [PATCH] test: fix dependencies between tests --- .../src/main/java/eu/stamp_project/utils/CloneHelper.java | 1 + .../test/java/eu/stamp_project/utils/DSpotUtilsTest.java | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dspot/src/main/java/eu/stamp_project/utils/CloneHelper.java b/dspot/src/main/java/eu/stamp_project/utils/CloneHelper.java index cec400a38..1d07ec113 100644 --- a/dspot/src/main/java/eu/stamp_project/utils/CloneHelper.java +++ b/dspot/src/main/java/eu/stamp_project/utils/CloneHelper.java @@ -27,6 +27,7 @@ public static void reset() { private static boolean shouldExecuteTestsInParallel; public static void init(boolean shouldExecuteTestsInParallel) { + reset(); CloneHelper.shouldExecuteTestsInParallel = shouldExecuteTestsInParallel; } diff --git a/dspot/src/test/java/eu/stamp_project/utils/DSpotUtilsTest.java b/dspot/src/test/java/eu/stamp_project/utils/DSpotUtilsTest.java index e9e3641e1..d5d9b4721 100644 --- a/dspot/src/test/java/eu/stamp_project/utils/DSpotUtilsTest.java +++ b/dspot/src/test/java/eu/stamp_project/utils/DSpotUtilsTest.java @@ -59,15 +59,12 @@ public void testWithLombokAnnotation() throws Exception { new BufferedReader(new FileReader(outputDirectory + "/fr/inria/lombok/LombokClassThatUseBuilderTest.java"))) { assertEquals( "package fr.inria.lombok;" + AmplificationHelper.LINE_SEPARATOR + - "" + AmplificationHelper.LINE_SEPARATOR + - "" + AmplificationHelper.LINE_SEPARATOR + - "import org.junit.Test;" + AmplificationHelper.LINE_SEPARATOR + "" + AmplificationHelper.LINE_SEPARATOR + "" + AmplificationHelper.LINE_SEPARATOR + "public class LombokClassThatUseBuilderTest {" + AmplificationHelper.LINE_SEPARATOR + - " @Test" + AmplificationHelper.LINE_SEPARATOR + + " @org.junit.Test" + AmplificationHelper.LINE_SEPARATOR + " public void test() {" + AmplificationHelper.LINE_SEPARATOR + - " builder().build();" + AmplificationHelper.LINE_SEPARATOR + + " fr.inria.lombok.LombokClassThatUseBuilder.builder().build();" + AmplificationHelper.LINE_SEPARATOR + " }" + AmplificationHelper.LINE_SEPARATOR + "}" + AmplificationHelper.LINE_SEPARATOR, reader.lines()