You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ch...@apache.org on 2024/01/19 02:29:52 UTC

(dolphinscheduler) branch dev updated: Fix PostgresqlDatabaseContainerProvider get Image is incorrect (#15434)

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

changhaifu pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new dcf69cad20 Fix PostgresqlDatabaseContainerProvider get Image is incorrect (#15434)
dcf69cad20 is described below

commit dcf69cad20642ffac3418b90ce9b7ea8c8ab29f1
Author: Wenjun Ruan <we...@apache.org>
AuthorDate: Fri Jan 19 10:29:46 2024 +0800

    Fix PostgresqlDatabaseContainerProvider get Image is incorrect (#15434)
---
 .../postgresql/PostgresqlDatabaseContainerProvider.java     | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/dolphinscheduler-tools/src/test/java/org/apache/dolphinscheduler/tools/datasource/postgresql/PostgresqlDatabaseContainerProvider.java b/dolphinscheduler-tools/src/test/java/org/apache/dolphinscheduler/tools/datasource/postgresql/PostgresqlDatabaseContainerProvider.java
index 91d4499cdb..c09b7fae01 100644
--- a/dolphinscheduler-tools/src/test/java/org/apache/dolphinscheduler/tools/datasource/postgresql/PostgresqlDatabaseContainerProvider.java
+++ b/dolphinscheduler-tools/src/test/java/org/apache/dolphinscheduler/tools/datasource/postgresql/PostgresqlDatabaseContainerProvider.java
@@ -40,12 +40,13 @@ public class PostgresqlDatabaseContainerProvider implements DatabaseContainerPro
     @Override
     public GenericContainer<?> getContainer(DolphinSchedulerDatabaseContainer dataSourceContainer) {
         // todo: test with multiple pg version
-        GenericContainer<?> postgresqlContainer = new PostgreSQLContainer(DockerImageName.parse("postgres:11.1"))
-                .withUsername("root")
-                .withPassword("root")
-                .withDatabaseName("dolphinscheduler")
-                .withNetwork(NETWORK)
-                .withExposedPorts(5432);
+        GenericContainer<?> postgresqlContainer =
+                new PostgreSQLContainer(DockerImageName.parse(dataSourceContainer.imageName()))
+                        .withUsername("root")
+                        .withPassword("root")
+                        .withDatabaseName("dolphinscheduler")
+                        .withNetwork(NETWORK)
+                        .withExposedPorts(5432);
         postgresqlContainer.setPortBindings(Lists.newArrayList("5432:5432"));
 
         return postgresqlContainer;