From 445108264f2a8fd3021647fdb0ee2033bdfb9c8f Mon Sep 17 00:00:00 2001 From: Ondrej Zizka Date: Sun, 1 Dec 2024 04:07:26 +0100 Subject: [PATCH] Test: Disable the test for known bug #149 --- src/main/kotlin/cz/dynawest/csvcruncher/Cruncher.kt | 4 +++- .../cz/dynawest/csvcruncher/it/OptionsCombinationsTest.kt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/cz/dynawest/csvcruncher/Cruncher.kt b/src/main/kotlin/cz/dynawest/csvcruncher/Cruncher.kt index 15fde07..1ac4784 100644 --- a/src/main/kotlin/cz/dynawest/csvcruncher/Cruncher.kt +++ b/src/main/kotlin/cz/dynawest/csvcruncher/Cruncher.kt @@ -48,8 +48,10 @@ class Cruncher(private val options: Options) { try { val existedBefore = File(dbPath).exists() FileUtils.forceMkdir(File(dbPath)) - if (options.dbDirOnExit == ExitCleanupStrategy.DELETE && !existedBefore) + if (options.dbDirOnExit == ExitCleanupStrategy.DELETE && !existedBefore) { File(dbPath).deleteOnExit() + log.debug("Will delete on exit: $dbPath") + } jdbcConn = DriverManager.getConnection("jdbc:hsqldb:file:$dbPath;shutdown=true;sql.syntax_mys=true", "SA", "") } catch (e: IOException) { diff --git a/src/test/kotlin/cz/dynawest/csvcruncher/it/OptionsCombinationsTest.kt b/src/test/kotlin/cz/dynawest/csvcruncher/it/OptionsCombinationsTest.kt index f28fa50..32e2940 100644 --- a/src/test/kotlin/cz/dynawest/csvcruncher/it/OptionsCombinationsTest.kt +++ b/src/test/kotlin/cz/dynawest/csvcruncher/it/OptionsCombinationsTest.kt @@ -141,7 +141,7 @@ class OptionsCombinationsTest { * The solution is not trivial, it needs to determine the output columns, using some merging of common columns, * probably utilizing SQL's NATURAL JOIN to reuse the same-named columns. */ - @Test + @Test @Disabled("Known bug #149.") fun combineInputDir_JsonAndCsv_defaultSql_issue149(testInfo: TestInfo) { val command = " | -in | $testDataDir/sample-multiFile-json+csv" +