This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 22c1464fde20 [SPARK-55578][SQL][TESTS] Improve 
`DockerJDBCIntegrationSuite` to support `sleepBeforeTesting`
22c1464fde20 is described below

commit 22c1464fde202ed42b6b6057729c5aedc75cb3a0
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Tue Feb 17 21:37:49 2026 -0800

    [SPARK-55578][SQL][TESTS] Improve `DockerJDBCIntegrationSuite` to support 
`sleepBeforeTesting`
    
    ### What changes were proposed in this pull request?
    
    This PR aims to improve `DockerJDBCIntegrationSuite` to support 
`sleepBeforeTesting`
    
    ### Why are the changes needed?
    
    Some DBMS images enter `Running` status even they are not ready to receive 
the connnection. This new API will help us handle those images.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #54355 from dongjoon-hyun/SPARK-55578.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../org/apache/spark/sql/jdbc/DockerJDBCIntegrationSuite.scala      | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerJDBCIntegrationSuite.scala
 
b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerJDBCIntegrationSuite.scala
index 0062b0357593..533251dac473 100644
--- 
a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerJDBCIntegrationSuite.scala
+++ 
b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerJDBCIntegrationSuite.scala
@@ -210,6 +210,7 @@ abstract class DockerJDBCIntegrationSuite
         assert(response.getState.getRunning)
       }
       jdbcUrl = db.getJdbcUrl(dockerIp, externalPort)
+      sleepBeforeTesting()
       var conn: Connection = null
       eventually(connectionTimeout, interval(1.second)) {
         conn = getConnection()
@@ -255,6 +256,11 @@ abstract class DockerJDBCIntegrationSuite
    */
   def dataPreparation(connection: Connection): Unit
 
+  /**
+   * Sleep for a while before testing.
+   */
+  def sleepBeforeTesting(): Unit = {}
+
   private def cleanupContainer(): Unit = {
     if (docker != null && container != null && !keepContainer) {
       try {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to