From 8459dbec606bb26a7c282d5f8660710099a34720 Mon Sep 17 00:00:00 2001 From: John Ed Quinn Date: Wed, 22 May 2024 10:23:14 -0700 Subject: [PATCH 1/2] Updates conformance test error handling for easier debugging --- .../kotlin/org/partiql/runner/executor/EvalExecutor.kt | 7 ++++++- .../src/test/kotlin/org/partiql/runner/test/TestRunner.kt | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/partiql-tests-runner/src/test/kotlin/org/partiql/runner/executor/EvalExecutor.kt b/test/partiql-tests-runner/src/test/kotlin/org/partiql/runner/executor/EvalExecutor.kt index a824209dcd..6f8d357d28 100644 --- a/test/partiql-tests-runner/src/test/kotlin/org/partiql/runner/executor/EvalExecutor.kt +++ b/test/partiql-tests-runner/src/test/kotlin/org/partiql/runner/executor/EvalExecutor.kt @@ -64,7 +64,12 @@ class EvalExecutor( if (actual is PartiQLResult.Value && expect is PartiQLResult.Value) { return valueComparison(actual.value, expect.value) } - error("Cannot compare different types of PartiQLResult") + val errorMessage = buildString { + appendLine("Cannot compare different types of PartiQLResult.") + appendLine(" - Expected : $expect") + appendLine(" - Actual : $actual") + } + error(errorMessage) } // Value comparison of PartiQL Value that utilized Ion Hashcode. diff --git a/test/partiql-tests-runner/src/test/kotlin/org/partiql/runner/test/TestRunner.kt b/test/partiql-tests-runner/src/test/kotlin/org/partiql/runner/test/TestRunner.kt index 014e15e1e0..6e16dcee96 100644 --- a/test/partiql-tests-runner/src/test/kotlin/org/partiql/runner/test/TestRunner.kt +++ b/test/partiql-tests-runner/src/test/kotlin/org/partiql/runner/test/TestRunner.kt @@ -46,7 +46,7 @@ class TestRunner(private val factory: TestExecutor.Factory) { } } catch (e: Exception) { when (case.assertion) { - is Assertion.EvaluationSuccess -> error("Expected success but exception thrown: $e") + is Assertion.EvaluationSuccess -> throw IllegalStateException("Expected success but exception thrown.", e) is Assertion.EvaluationFailure -> {} // skip } } From 14a37bc11f05d067d1ff2b9acc79a9cf348e04a5 Mon Sep 17 00:00:00 2001 From: John Ed Quinn Date: Wed, 22 May 2024 10:24:36 -0700 Subject: [PATCH 2/2] Updates conformance tests to latest commit --- test/partiql-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/partiql-tests b/test/partiql-tests index 233713b784..be88ae732b 160000 --- a/test/partiql-tests +++ b/test/partiql-tests @@ -1 +1 @@ -Subproject commit 233713b7841eb559c4f4978f2955facf3c92c7d8 +Subproject commit be88ae732bec0388c88acab108a392f586094fc7