Skip to content

Commit 5fb3da8

Browse files
committed
[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.
1 parent bf127c2 commit 5fb3da8

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎regression-test/suites/external_table_p0/lower_case/test_lower_case_meta_with_lower_table_conf_show_and_select.groovy‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
import java.util.concurrent.Executors
19-
import java.util.concurrent.TimeUnit
20-
import org.awaitility.Awaitility
21-
2218
suite("test_lower_case_meta_with_lower_table_conf_show_and_select", "p0,external") {
2319

2420
String jdbcUrl = context.config.jdbcUrl
@@ -30,7 +26,8 @@ suite("test_lower_case_meta_with_lower_table_conf_show_and_select", "p0,external
3026
// String driver_url = "mysql-connector-j-8.4.0.jar"
3127

3228
def wait_table_sync = { String db ->
33-
Awaitility.await().atMost(10, TimeUnit.SECONDS).pollInterval(1, TimeUnit.SECONDS).until{
29+
// Poll on the suite thread so its ThreadLocal JDBC connection is reused and closed by suite cleanup.
30+
awaitUntil(10, 1) {
3431
try {
3532
def res = sql "show tables from ${db}"
3633
return res.size() > 0;

0 commit comments

Comments
 (0)