From 719fcccd1cddbebf6435d531c5abe2f6fdf06a6f Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sat, 11 Nov 2023 18:15:48 -0500 Subject: [PATCH 1/3] [test] Fix exception usage on before all (was exception should be ioexception) --- src/test/java/org/apache/ibatis/migration/MigratorTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/apache/ibatis/migration/MigratorTest.java b/src/test/java/org/apache/ibatis/migration/MigratorTest.java index 6c360de4..1dac0ae8 100644 --- a/src/test/java/org/apache/ibatis/migration/MigratorTest.java +++ b/src/test/java/org/apache/ibatis/migration/MigratorTest.java @@ -24,6 +24,7 @@ import com.github.stefanbirkner.systemlambda.SystemLambda; import java.io.File; +import java.io.IOException; import java.io.PrintWriter; import java.nio.file.Files; import java.nio.file.Path; @@ -55,7 +56,7 @@ class MigratorTest { private static Properties env; @BeforeAll - static void setup() throws Exception { + static void setup() throws IOException { dir = Resources.getResourceAsFile("org/apache/ibatis/migration/example"); env = Resources.getResourceAsProperties("org/apache/ibatis/migration/example/environments/development.properties"); } From 225fb08545bc3567db6a3482ecec48c2822fb1e3 Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sat, 11 Nov 2023 18:34:57 -0500 Subject: [PATCH 2/3] [TODO] Mark test that is tart of failure for hsqldb upgrade --- src/test/java/org/apache/ibatis/migration/MigratorTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/org/apache/ibatis/migration/MigratorTest.java b/src/test/java/org/apache/ibatis/migration/MigratorTest.java index 1dac0ae8..2019effd 100644 --- a/src/test/java/org/apache/ibatis/migration/MigratorTest.java +++ b/src/test/java/org/apache/ibatis/migration/MigratorTest.java @@ -81,6 +81,7 @@ void testStatusContainsNoPendingEntriesUsingStatusShorthand() throws Exception { assertTrue(output.contains("...pending...")); } + // TODO This causes hsqldb 2.7.1 or 2.7.2 to blow up @Test @Order(3) void testUpCommandWithSpecifiedSteps() throws Exception { From 68c55799aab681a837815f5ba4ba7de569f373fb Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sat, 11 Nov 2023 18:35:15 -0500 Subject: [PATCH 3/3] [ci] Add note so no one listens to sonarlint here --- src/main/java/org/apache/ibatis/migration/CommandLine.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/apache/ibatis/migration/CommandLine.java b/src/main/java/org/apache/ibatis/migration/CommandLine.java index 96ebae3b..3d9225aa 100644 --- a/src/main/java/org/apache/ibatis/migration/CommandLine.java +++ b/src/main/java/org/apache/ibatis/migration/CommandLine.java @@ -30,6 +30,7 @@ import org.apache.ibatis.migration.utils.Util; public class CommandLine { + // Leave this non static as it is messed with in this project tests private final PrintStream console = System.out; private final String[] args;