DBZ-518 Remove a leftover event
This commit is contained in:
parent
ecf6a86594
commit
42d103294e
@ -385,6 +385,22 @@ public void shouldProcessIntervalDelete() throws Exception {
|
||||
consumer = testConsumer(4);
|
||||
recordsProducer.start(consumer);
|
||||
executeAndWait(statements);
|
||||
|
||||
final String topicPrefix = "public.table_with_interval";
|
||||
final String topicName = topicName(topicPrefix);
|
||||
final String pk = "id";
|
||||
assertRecordInserted(topicPrefix, pk, 1);
|
||||
assertRecordInserted(topicPrefix, pk, 2);
|
||||
|
||||
// first entry removed
|
||||
SourceRecord record = consumer.remove();
|
||||
assertEquals(topicName, record.topic());
|
||||
VerifyRecord.isValidDelete(record, pk, 1);
|
||||
|
||||
// followed by a tombstone
|
||||
record = consumer.remove();
|
||||
assertEquals(topicName, record.topic());
|
||||
VerifyRecord.isValidTombstone(record, pk, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -392,6 +408,14 @@ public void shouldProcessIntervalDelete() throws Exception {
|
||||
public void shouldNotStartAfterStop() throws Exception {
|
||||
recordsProducer.stop();
|
||||
recordsProducer.start(consumer);
|
||||
|
||||
// Need to remove record created in @Before
|
||||
PostgresConnectorConfig config = new PostgresConnectorConfig(TestHelper.defaultConfig().with(PostgresConnectorConfig.INCLUDE_UNKNOWN_DATATYPES, true).build());
|
||||
PostgresTaskContext context = new PostgresTaskContext(config, new PostgresSchema(config));
|
||||
recordsProducer = new RecordsStreamProducer(context, new SourceInfo(config.serverName()));
|
||||
|
||||
consumer = testConsumer(1);
|
||||
recordsProducer.start(consumer);
|
||||
}
|
||||
|
||||
private void assertInsert(String statement, List<SchemaAndValueField> expectedSchemaAndValuesByColumn) {
|
||||
|
Loading…
Reference in New Issue
Block a user