You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/07/04 15:49:34 UTC
[GitHub] [pulsar] willome commented on issue #4668: Add Debezium Postgresql
integration test
willome commented on issue #4668: Add Debezium Postgresql integration test
URL: https://github.com/apache/pulsar/pull/4668#issuecomment-508524853
This test is a copy/paste of the Mysql one. I have tried to add some data in the Postgres db but unfortunately I can't connect to the docker postgres container (jdbc:postgresql://host:port/dbname). I have tried with localhost, DebeziumPostgresqlContainer.NAME. Maybe I need to change the pg_hba.conf. Any idea ?
```
@Override
public Map<String, String> produceSourceMessages(int numMessages) throws Exception {
String SQL = "INSERT INTO inventory.products VALUES (default,'scooter','3-wheel scooter')";
String urlConnect = String.format("jdbc:postgresql://%s:%s/%s", "localhost",
sourceConfig.get("database.port"), sourceConfig.get("database.dbname"));
try (Connection conn = DriverManager.getConnection(urlConnect, (String) sourceConfig.get("database.user"),
(String) sourceConfig.get("database.password"));
// connection failure
PreparedStatement pstmt = conn.prepareStatement(SQL))
{
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services