Changeset: b43a5fdc3e62 for monetdb-java
URL: https://dev.monetdb.org/hg/monetdb-java/rev/b43a5fdc3e62
Modified Files:
.github/workflows/testjars.yml
src/test/java/org/monetdb/jdbc/ApiTests.java
Branch: default
Log Message:
Adjust ApiTests#testDebug to work with old MonetDB versions
diffs (38 lines):
diff --git a/.github/workflows/testjars.yml b/.github/workflows/testjars.yml
--- a/.github/workflows/testjars.yml
+++ b/.github/workflows/testjars.yml
@@ -155,7 +155,7 @@ jobs:
- "monetdb/monetdb:Dec2023-SP4"
- "monetdb/monetdb:Jun2023-SP3"
- "monetdb/monetdb:Sep2022-SP3"
- # These containers are too old to be compatible with our tests
+ # These containers are too old to be compatible with our tests:
# - "monetdb/monetdb:Jan2022-SP4"
# - "monetdb/monetdb:Jul2021-SP2"
runs-on: ubuntu-latest
diff --git a/src/test/java/org/monetdb/jdbc/ApiTests.java
b/src/test/java/org/monetdb/jdbc/ApiTests.java
--- a/src/test/java/org/monetdb/jdbc/ApiTests.java
+++ b/src/test/java/org/monetdb/jdbc/ApiTests.java
@@ -847,11 +847,17 @@ public class ApiTests {
public void testDebug() throws SQLException {
// DEBUG has not been supported by MonetDB for a while but the
old jdbc test
// suite had a test for it so we include it.
- //
- // The original test had the following comment:
- // From Jun2023 we skip the comparison as it gives a
different error msg on power8 platform: syntax error, unexpected IDENT in:
"debug"
- // let's see what happens and adjust this test accordingly
- assertSQLException("unexpected IDENT", () ->
stmt.executeQuery("DEBUG SELECT 42"));
+
+ String expectedErrorMessage;
+ // The precise version boundaries may be wrong but this is
enough to pass CI.
+ if (monetVersion.isAtLeast(11, 49, 0)) // Dec2023 and later
+ expectedErrorMessage = "unexpected IDENT";
+ else if (monetVersion.isAtLeast(11, 47, 0)) // Jun2023
+ expectedErrorMessage = "syntax error in: \"debug\"";
+ else // earlier
+ expectedErrorMessage = "only supported in interactive
mode";
+
+ assertSQLException(expectedErrorMessage, () ->
stmt.executeQuery("DEBUG SELECT 42"));
}
@Test
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]