Mercurial > hg > monetdb-java
diff tests/UrlTester.java @ 792:9dea0795a926 monetdbs
Understand so_timeout, treat_clob_as_varchar and treat_blob_as_binary
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Fri, 01 Dec 2023 15:47:20 +0100 (17 months ago) |
parents | 4de810c22328 |
children | 9f6fe96c0ead |
line wrap: on
line diff
--- a/tests/UrlTester.java +++ b/tests/UrlTester.java @@ -21,6 +21,7 @@ public class UrlTester { public static void main(String[] args) throws Exception { checkDefaults(); + checkParameters(); int exitcode; UrlTester tester = new UrlTester(); @@ -30,6 +31,7 @@ public class UrlTester { System.exit(exitcode); } + private static void checkDefaults() { Target target = new Target(); @@ -39,8 +41,17 @@ public class UrlTester { continue; Object actual = target.getObject(parm); if (!expected.equals(actual)) { - System.err.println("Default for " + parm.name + " expected to be <" + expected + "> but is <" + actual + ">"); - System.exit(1); + throw new RuntimeException("Default for " + parm.name + " expected to be <" + expected + "> but is <" + actual + ">"); + } + } + } + + private static void checkParameters() { + for (Parameter parm: Parameter.values()) { + Parameter found = Parameter.forName(parm.name); + if (parm != found) { + String foundStr = found != null ? found.name : "null"; + throw new RuntimeException("Looking up <" + parm.name + ">, found <" + foundStr); } } }