Skip to content

Commit 25982b6

Browse files
committed
Use dedicated table for LogicalDecodeIntegrationTests
Avoid clashes with PostgresTestKit. [#18]
1 parent 5dc08cf commit 25982b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/io/r2dbc/postgresql/replication/LogicalDecodeIntegrationTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ void shouldReceiveReplication() {
9999

100100
ReplicationStream replicationStream = replicationConnection.startReplication(replicationRequest).block(Duration.ofSeconds(10));
101101

102-
connection.createStatement("INSERT INTO test VALUES('Hello World')").execute().flatMap(PostgresqlResult::getRowsUpdated).as(StepVerifier::create).expectNext(1).verifyComplete();
102+
connection.createStatement("INSERT INTO logical_decode_test VALUES('Hello World')").execute().flatMap(PostgresqlResult::getRowsUpdated).as(StepVerifier::create).expectNext(1).verifyComplete();
103103

104104
replicationStream.map(byteBuf -> byteBuf.toString(StandardCharsets.UTF_8))
105105
.as(StepVerifier::create)
106106
.expectNext("BEGIN")
107-
.expectNext("table public.test: INSERT: first_name[character varying]:'Hello World'")
107+
.expectNext("table public.logical_decode_test: INSERT: first_name[character varying]:'Hello World'")
108108
.expectNext("COMMIT")
109109
.then(() -> replicationStream.close().subscribe())
110110
.verifyComplete();
@@ -133,9 +133,9 @@ void replicationShouldFailWithWrongSlotType() {
133133
}
134134

135135
private void prepare(PostgresqlConnection connection) {
136-
connection.createStatement("DROP TABLE IF EXISTS test").execute().flatMap(PostgresqlResult::getRowsUpdated).as(StepVerifier::create).verifyComplete();
136+
connection.createStatement("DROP TABLE IF EXISTS logical_decode_test").execute().flatMap(PostgresqlResult::getRowsUpdated).as(StepVerifier::create).verifyComplete();
137137

138-
connection.createStatement("CREATE TABLE test (first_name varchar(255))").execute().flatMap(PostgresqlResult::getRowsUpdated).as(StepVerifier::create).verifyComplete();
138+
connection.createStatement("CREATE TABLE logical_decode_test (first_name varchar(255))").execute().flatMap(PostgresqlResult::getRowsUpdated).as(StepVerifier::create).verifyComplete();
139139
}
140140

141141
private ReplicationSlotRequest createSlot(PostgresqlReplicationConnection replicationConnection) {

0 commit comments

Comments
 (0)