yaooqinn commented on code in PR #44509:
URL: https://github.com/apache/spark/pull/44509#discussion_r1437099012
##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerJDBCIntegrationSuite.scala:
##########
@@ -111,56 +115,75 @@ abstract class DockerJDBCIntegrationSuite
sock.close()
port
}
- private var containerId: String = _
+ private var container: CreateContainerResponse = _
private var pulled: Boolean = false
protected var jdbcUrl: String = _
override def beforeAll(): Unit = runIfTestsEnabled(s"Prepare for
${this.getClass.getName}") {
super.beforeAll()
try {
- docker = DefaultDockerClient.fromEnv.build()
+ val config = DefaultDockerClientConfig.createDefaultConfigBuilder.build
+ val httpClient = new ZerodepDockerHttpClient.Builder()
+ .dockerHost(config.getDockerHost)
+ .sslConfig(config.getSSLConfig)
+ .build()
+ docker = DockerClientImpl.getInstance(config, httpClient)
// Check that Docker is actually up
try {
- docker.ping()
+ docker.pingCmd().exec()
} catch {
case NonFatal(e) =>
log.error("Exception while connecting to Docker. Check whether
Docker is running.")
throw e
}
- // Ensure that the Docker image is installed:
try {
- docker.inspectImage(db.imageName)
+ // Ensure that the Docker image is installed:
+ docker.inspectImageCmd("mariadb:10.5.12").exec()
Review Comment:
```suggestion
docker.inspectImageCmd(db.imageName).exec()
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]