TeslaCN commented on code in PR #28111:
URL: https://github.com/apache/shardingsphere/pull/28111#discussion_r1295431006


##########
test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/wait/JdbcConnectionWaitStrategy.java:
##########
@@ -37,19 +37,17 @@ public final class JdbcConnectionWaitStrategy extends 
AbstractWaitStrategy {
     
     @Override
     protected void waitUntilReady() {
-        Unreliables.retryUntilSuccess((int) startupTimeout.getSeconds(), 
TimeUnit.SECONDS, this::mockRateLimiter);
+        
Awaitility.await().ignoreException(RuntimeException.class).atMost(startupTimeout.getSeconds(),
 TimeUnit.SECONDS).pollInterval(1L, 
TimeUnit.SECONDS).until(this::checkConnection);
     }
     
-    private boolean mockRateLimiter() {
-        getRateLimiter().doWhenReady(() -> {
-            try (Connection ignored = connectionSupplier.call()) {
-                log.info("Container ready.");
-                // CHECKSTYLE:OFF
-            } catch (final Exception ex) {
-                // CHECKSTYLE:ON
-                throw new RuntimeException("Not Ready yet.", ex);
-            }
-        });
-        return true;
+    private boolean checkConnection() {
+        try (Connection ignored = connectionSupplier.call()) {
+            log.info("Container ready.");
+            return true;
+            // CHECKSTYLE:OFF
+        } catch (final Exception ex) {

Review Comment:
   Maybe this could be removed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to