From 5fb3da8864310e6f433dec881b10ea3d74b395b1 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Mon, 21 Sep 2026 16:48:53 +0800 Subject: [PATCH] [fix](test) Reuse the suite connection when polling lower-case tables ### What problem does this PR solve? Related PR: #68101 Separate Awaitility polling threads create thread-local JDBC connections that suite-thread cleanup cannot close, eventually exhausting the user's connection quota. Use the existing same-thread awaitUntil helper and explain the connection ownership invariant next to the wait. ### Release note None ### Check List (For Author) - Test: Manual red/green ownership probe with the actual Groovy wait closure and framework helper; full-case Groovy compilation; git diff --check. - Behavior changed: No production behavior change. - Does this need documentation: No. --- ..._case_meta_with_lower_table_conf_show_and_select.groovy | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/regression-test/suites/external_table_p0/lower_case/test_lower_case_meta_with_lower_table_conf_show_and_select.groovy b/regression-test/suites/external_table_p0/lower_case/test_lower_case_meta_with_lower_table_conf_show_and_select.groovy index a71dd38ca0e27c..240be7f5de373a 100644 --- a/regression-test/suites/external_table_p0/lower_case/test_lower_case_meta_with_lower_table_conf_show_and_select.groovy +++ b/regression-test/suites/external_table_p0/lower_case/test_lower_case_meta_with_lower_table_conf_show_and_select.groovy @@ -15,10 +15,6 @@ // specific language governing permissions and limitations // under the License. -import java.util.concurrent.Executors -import java.util.concurrent.TimeUnit -import org.awaitility.Awaitility - suite("test_lower_case_meta_with_lower_table_conf_show_and_select", "p0,external") { String jdbcUrl = context.config.jdbcUrl @@ -30,7 +26,8 @@ suite("test_lower_case_meta_with_lower_table_conf_show_and_select", "p0,external // String driver_url = "mysql-connector-j-8.4.0.jar" def wait_table_sync = { String db -> - Awaitility.await().atMost(10, TimeUnit.SECONDS).pollInterval(1, TimeUnit.SECONDS).until{ + // Poll on the suite thread so its ThreadLocal JDBC connection is reused and closed by suite cleanup. + awaitUntil(10, 1) { try { def res = sql "show tables from ${db}" return res.size() > 0;