Skip to content

Commit 324c8d6

Browse files
committed
[SPARK-29567][TESTS] Update JDBC Integration Test Docker Images
1 parent 8c34690 commit 324c8d6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import org.apache.spark.tags.DockerTest
2727
@DockerTest
2828
class MySQLIntegrationSuite extends DockerJDBCIntegrationSuite {
2929
override val db = new DatabaseOnDocker {
30-
override val imageName = "mysql:5.7.9"
30+
override val imageName = "mysql:5.7.28"
3131
override val env = Map(
3232
"MYSQL_ROOT_PASSWORD" -> "rootpass"
3333
)
@@ -39,6 +39,8 @@ class MySQLIntegrationSuite extends DockerJDBCIntegrationSuite {
3939
}
4040

4141
override def dataPreparation(conn: Connection): Unit = {
42+
// Since MySQL 5.7.14+, we need to disable strict mode
43+
conn.prepareStatement("SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION'").executeUpdate()
4244
conn.prepareStatement("CREATE DATABASE foo").executeUpdate()
4345
conn.prepareStatement("CREATE TABLE tbl (x INTEGER, y TEXT(8))").executeUpdate()
4446
conn.prepareStatement("INSERT INTO tbl VALUES (42,'fred')").executeUpdate()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import org.apache.spark.tags.DockerTest
2929
@DockerTest
3030
class PostgresIntegrationSuite extends DockerJDBCIntegrationSuite {
3131
override val db = new DatabaseOnDocker {
32-
override val imageName = "postgres:11.4"
32+
override val imageName = "postgres:12.0-alpine"
3333
override val env = Map(
3434
"POSTGRES_PASSWORD" -> "rootpass"
3535
)

0 commit comments

Comments
 (0)