From 6f4f791e29be72cae07e30e54f98a1d4d210273d Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sat, 6 May 2023 16:45:34 -0400 Subject: [PATCH] [ci] Handle wait condition and write log if it fails was previously ignored response value --- .../org/apache/ibatis/datasource/pooled/PooledDataSource.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/ibatis/datasource/pooled/PooledDataSource.java b/src/main/java/org/apache/ibatis/datasource/pooled/PooledDataSource.java index 663c832186d..758b396be79 100644 --- a/src/main/java/org/apache/ibatis/datasource/pooled/PooledDataSource.java +++ b/src/main/java/org/apache/ibatis/datasource/pooled/PooledDataSource.java @@ -494,7 +494,9 @@ private PooledConnection popConnection(String username, String password) throws log.debug("Waiting as long as " + poolTimeToWait + " milliseconds for connection."); } long wt = System.currentTimeMillis(); - condition.await(poolTimeToWait, TimeUnit.MILLISECONDS); + if (!condition.await(poolTimeToWait, TimeUnit.MILLISECONDS)) { + log.debug("Wait failed..."); + } state.accumulatedWaitTime += System.currentTimeMillis() - wt; } catch (InterruptedException e) { // set interrupt flag