DBZ-5408 Make sure streaming is fully running before dropping connection

This commit is contained in:
Vojtech Juranek 2022-07-14 14:33:16 +02:00 committed by Chris Cranford
parent 04941330c3
commit 3527479cd8

View File

@ -1022,10 +1022,14 @@ public void shouldRecoverFromRetriableException() throws Exception {
assertRecordsFromSnapshot(2, 1, 1);
// DBZ-5408 make sure regular streaming is fully running
TestHelper.execute(INSERT_STMT);
assertRecordsAfterInsert(2, 2, 2);
// kill all opened connections to the database
TestHelper.execute("SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE backend_type='walsender'");
TestHelper.execute(INSERT_STMT);
assertRecordsAfterInsert(2, 2, 2);
assertRecordsAfterInsert(2, 3, 3);
}
@Test