Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datastore-postgres: hoist test database test fixture from postgres source and destination #35486

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 96 additions & 94 deletions airbyte-cdk/java/airbyte-cdk/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.21.4
version=0.22.0
Original file line number Diff line number Diff line change
@@ -11,5 +11,7 @@ dependencies {

api 'org.postgresql:postgresql:42.6.0'

testFixturesImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))

testFixturesApi 'org.testcontainers:postgresql:1.19.0'
}
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
* Copyright (c) 2023 Airbyte, Inc., all rights reserved.
*/

package io.airbyte.integrations.source.postgres;
package io.airbyte.integrations.postgres;

import io.airbyte.cdk.testutils.ContainerFactory;
import java.io.IOException;
Original file line number Diff line number Diff line change
@@ -2,10 +2,7 @@
* Copyright (c) 2023 Airbyte, Inc., all rights reserved.
*/

package io.airbyte.integrations.source.postgres;

import static io.airbyte.integrations.source.postgres.PostgresSpecConstants.INVALID_CDC_CURSOR_POSITION_PROPERTY;
import static io.airbyte.integrations.source.postgres.PostgresSpecConstants.RESYNC_DATA_OPTION;
package io.airbyte.integrations.postgres;

import com.google.common.collect.ImmutableMap;
import io.airbyte.cdk.db.factory.DatabaseDriver;
@@ -25,6 +22,7 @@ public class PostgresTestDatabase extends
public static enum BaseImage {

POSTGRES_16("postgres:16-bullseye", 16),
POSTGRES_13("postgres:13-bullseye", 13),
POSTGRES_12("postgres:12-bullseye", 12),
POSTGRES_9("postgres:9-alpine", 9),
POSTGRES_SSL_DEV("marcosmarxm/postgres-ssl:dev", 16);
@@ -177,7 +175,7 @@ public PostgresConfigBuilder withStandardReplication() {
}

public PostgresConfigBuilder withCdcReplication() {
return withCdcReplication("While reading Data", RESYNC_DATA_OPTION);
return withCdcReplication("While reading Data", "Re-sync data");
}

public PostgresConfigBuilder withCdcReplication(String LsnCommitBehaviour, String cdcCursorFailBehaviour) {
@@ -189,7 +187,7 @@ public PostgresConfigBuilder withCdcReplication(String LsnCommitBehaviour, Strin
.put("publication", testDatabase.getPublicationName())
.put("initial_waiting_seconds", DEFAULT_CDC_REPLICATION_INITIAL_WAIT.getSeconds())
.put("lsn_commit_behaviour", LsnCommitBehaviour)
.put(INVALID_CDC_CURSOR_POSITION_PROPERTY, cdcCursorFailBehaviour)
.put("invalid_cdc_cursor_position_behavior", cdcCursorFailBehaviour)
.build()));
}

Loading