CalvinKirs commented on code in PR #2677:
URL: 
https://github.com/apache/incubator-seatunnel/pull/2677#discussion_r966716350


##########
seatunnel-e2e/seatunnel-flink-connector-v2-e2e/connector-jdbc-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/v2/jdbc/FakeSourceToJdbcIT.java:
##########
@@ -54,9 +57,11 @@ public void startPostgreSqlContainer() throws 
InterruptedException, ClassNotFoun
                 .withLogConsumer(new Slf4jLogConsumer(LOGGER));
         Startables.deepStart(Stream.of(psl)).join();
         LOGGER.info("PostgreSql container started");
-        Thread.sleep(5000L);
         Class.forName(psl.getDriverClassName());
-        initializeJdbcTable();
+        given().ignoreExceptions()
+            .await()
+            .atMost(5, TimeUnit.SECONDS)
+            .untilAsserted(() -> initializeJdbcTable());

Review Comment:
   How about adding a minimum wait time (ideally when the initialization 
completes short times), and then start polling until it succeeds or eventually 
fails or a timeout?



-- 
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