Skip to content

Commit d612e8d

Browse files
authored
Merge pull request #10 from liubao68/work
remove unnecessary dependency
2 parents bcd44f3 + 6416e06 commit d612e8d

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

flink-connector-jdbc-gaussdb/pom.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,6 @@
9898
<artifactId>jdbc</artifactId>
9999
<scope>test</scope>
100100
</dependency>
101-
<dependency>
102-
<groupId>org.testcontainers</groupId>
103-
<artifactId>postgresql</artifactId>
104-
<scope>test</scope>
105-
</dependency>
106-
<dependency>
107-
<groupId>org.postgresql</groupId>
108-
<artifactId>postgresql</artifactId>
109-
<version>42.7.3</version>
110-
<scope>test</scope>
111-
</dependency>
112101
<dependency>
113102
<groupId>com.fasterxml.jackson.core</groupId>
114103
<artifactId>jackson-core</artifactId>

flink-connector-jdbc-gaussdb/src/test/java/org/apache/flink/connector/jdbc/gaussdb/testutils/GaussdbMetadata.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919

2020
import org.apache.flink.connector.jdbc.testutils.DatabaseMetadata;
2121

22-
import org.postgresql.xa.PGXADataSource;
22+
import com.huawei.gaussdb.jdbc.util.PSQLException;
23+
import com.huawei.gaussdb.jdbc.xa.PGXADataSource;
2324
import org.testcontainers.containers.JdbcDatabaseContainer;
2425

2526
import javax.sql.XADataSource;
@@ -78,7 +79,11 @@ public XADataSource buildXaDataSource() {
7879
}
7980

8081
PGXADataSource xaDataSource = new PGXADataSource();
81-
xaDataSource.setUrl(getJdbcUrl());
82+
try {
83+
xaDataSource.setUrl(getJdbcUrl());
84+
} catch (PSQLException e) {
85+
throw new RuntimeException(e);
86+
}
8287
xaDataSource.setUser(getUsername());
8388
xaDataSource.setPassword(getPassword());
8489
return xaDataSource;

0 commit comments

Comments
 (0)