From a292ca8d466d814e092a782669d1fc417508ca3d Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 8 Jan 2024 20:04:47 -0600 Subject: [PATCH] CLDR-17288 fix issue with previous fix to XPathTable - XPathTable should be called with an autoclose connection only --- .../java/org/unicode/cldr/unittest/web/TestXPathTable.java | 4 ++-- .../src/test/java/org/unicode/cldr/web/TestSTFactory.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/cldr-apps/src/test/java/org/unicode/cldr/unittest/web/TestXPathTable.java b/tools/cldr-apps/src/test/java/org/unicode/cldr/unittest/web/TestXPathTable.java index 186c24067e9..35012be3647 100644 --- a/tools/cldr-apps/src/test/java/org/unicode/cldr/unittest/web/TestXPathTable.java +++ b/tools/cldr-apps/src/test/java/org/unicode/cldr/unittest/web/TestXPathTable.java @@ -29,7 +29,7 @@ public TestXPathTable() { public void TestPutGet() throws SQLException { if (TestAll.skipIfNoDb()) return; logln("Testing " + TEST_COUNT + " xpaths"); - Connection conn = DBUtils.getInstance().getDBConnection(); + Connection conn = DBUtils.getInstance().getAConnection(); XPathTable xpt = XPathTable.createTable(conn); DBUtils.closeDBConnection(conn); HashMap s = new HashMap<>(); @@ -111,7 +111,7 @@ public void TestRemoveDraftAltProposed() { public void TestNonDistinguishing() throws SQLException { if (TestAll.skipIfNoDb()) return; - Connection conn = DBUtils.getInstance().getDBConnection(); + Connection conn = DBUtils.getInstance().getAConnection(); XPathTable xpt = XPathTable.createTable(conn); DBUtils.closeDBConnection(conn); diff --git a/tools/cldr-apps/src/test/java/org/unicode/cldr/web/TestSTFactory.java b/tools/cldr-apps/src/test/java/org/unicode/cldr/web/TestSTFactory.java index 82ff8ab9264..809c7e18942 100644 --- a/tools/cldr-apps/src/test/java/org/unicode/cldr/web/TestSTFactory.java +++ b/tools/cldr-apps/src/test/java/org/unicode/cldr/web/TestSTFactory.java @@ -684,7 +684,7 @@ public static STFactory createFactory() throws SQLException { new File(CLDRPaths.BASE_DIRECTORY, "seed/annotations/").getAbsolutePath(); et0 = new ElapsedTimer("setup DB"); - Connection conn = DBUtils.getInstance().getDBConnection(); + Connection conn = DBUtils.getInstance().getAConnection(); System.err.println(et0.toString()); et0 = new ElapsedTimer("setup Registry");