Skip to content

Commit e56e02b

Browse files
committed
timeout config
1 parent b546885 commit e56e02b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerJDBCIntegrationSuite.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ abstract class DockerJDBCIntegrationSuite extends SharedSparkSession with Eventu
9595

9696
protected val dockerIp = DockerUtils.getDockerIp()
9797
val db: DatabaseOnDocker
98+
val connectionTimeout = timeout(2.minutes)
9899

99100
private var docker: DockerClient = _
100101
protected var externalPort: Int = _
@@ -155,7 +156,7 @@ abstract class DockerJDBCIntegrationSuite extends SharedSparkSession with Eventu
155156
docker.startContainer(containerId)
156157
jdbcUrl = db.getJdbcUrl(dockerIp, externalPort)
157158
var conn: Connection = null
158-
eventually(timeout(7.minutes), interval(1.second)) {
159+
eventually(connectionTimeout, interval(1.second)) {
159160
conn = getConnection()
160161
}
161162
// Run any setup queries:

external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/OracleIntegrationSuite.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import java.math.BigDecimal
2121
import java.sql.{Connection, Date, Timestamp}
2222
import java.util.{Properties, TimeZone}
2323

24+
import org.scalatest.time.SpanSugar._
25+
2426
import org.apache.spark.sql.{Row, SaveMode}
2527
import org.apache.spark.sql.execution.{RowDataSourceScanExec, WholeStageCodegenExec}
2628
import org.apache.spark.sql.execution.datasources.LogicalRelation
@@ -68,6 +70,8 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSpark
6870
s"jdbc:oracle:thin:system/oracle@//$ip:$port/xe"
6971
}
7072

73+
override val connectionTimeout = timeout(7.minutes)
74+
7175
override def dataPreparation(conn: Connection): Unit = {
7276
// In 18.4.0 Express Edition auto commit is enabled by default.
7377
conn.setAutoCommit(false)

0 commit comments

Comments
 (0)