From 55d9ac274971e6ae000883272f403b2e00843b2d Mon Sep 17 00:00:00 2001 From: Ashhar Hasan Date: Wed, 23 Feb 2022 12:21:37 +0530 Subject: [PATCH] Test against PostgreSQL 10 since 9.x is now unsupported The connector tests were already migrated to use PostgreSQL 10 in 92e5ba6c03006bc306f7aff29c09c79d51154b57. We also pin to a specific version to avoid CI being non-deterministic. --- .../io/trino/plugin/postgresql/TestingPostgreSqlServer.java | 2 +- .../db/TestDbResourceGroupsPostgresqlFlywayMigration.java | 2 +- .../launcher/env/environment/EnvSinglenodePostgresql.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestingPostgreSqlServer.java b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestingPostgreSqlServer.java index 17cbfdcb756d..91d32e05b797 100644 --- a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestingPostgreSqlServer.java +++ b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestingPostgreSqlServer.java @@ -51,7 +51,7 @@ public class TestingPostgreSqlServer public TestingPostgreSqlServer() { // Use the oldest supported PostgreSQL version - dockerContainer = new PostgreSQLContainer<>("postgres:10") + dockerContainer = new PostgreSQLContainer<>("postgres:10.20") .withDatabaseName(DATABASE) .withUsername(USER) .withPassword(PASSWORD) diff --git a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbResourceGroupsPostgresqlFlywayMigration.java b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbResourceGroupsPostgresqlFlywayMigration.java index 1ff1683ace47..bedcaec878a1 100644 --- a/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbResourceGroupsPostgresqlFlywayMigration.java +++ b/plugin/trino-resource-group-managers/src/test/java/io/trino/plugin/resourcegroups/db/TestDbResourceGroupsPostgresqlFlywayMigration.java @@ -24,7 +24,7 @@ public class TestDbResourceGroupsPostgresqlFlywayMigration @Override protected final JdbcDatabaseContainer startContainer() { - JdbcDatabaseContainer container = new PostgreSQLContainer<>("postgres:9.6"); + JdbcDatabaseContainer container = new PostgreSQLContainer<>("postgres:10.20"); container.start(); return container; } diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/EnvSinglenodePostgresql.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/EnvSinglenodePostgresql.java index a46f04db3eed..a343a41687f9 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/EnvSinglenodePostgresql.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/EnvSinglenodePostgresql.java @@ -65,7 +65,7 @@ public void extendEnvironment(Environment.Builder builder) private DockerContainer createPostgreSql() { // Use the oldest supported PostgreSQL version - DockerContainer container = new DockerContainer("postgres:9.6", "postgresql") + DockerContainer container = new DockerContainer("postgres:10.20", "postgresql") .withEnv("POSTGRES_PASSWORD", "test") .withEnv("POSTGRES_USER", "test") .withEnv("POSTGRES_DB", "test")