DBZ-5739 Fix another test with expected error message

This commit is contained in:
Praveen Burgu 2022-10-21 17:23:22 -07:00 committed by Jiri Pechanec
parent 8e3867f23f
commit cb535d2ce6

View File

@ -86,7 +86,6 @@ public void shouldCreateAndDropReplicationSlots() throws Exception {
@Test(expected = DebeziumException.class)
public void shouldNotAllowMultipleReplicationSlotsOnTheSameDBSlotAndPlugin() throws Exception {
LogInterceptor interceptor = new LogInterceptor(PostgresReplicationConnection.class);
// create a replication connection which should be dropped once it's closed
try (ReplicationConnection conn1 = TestHelper.createForReplication("test1", true)) {
conn1.startStreaming(new WalPositionLocator());
@ -95,7 +94,7 @@ public void shouldNotAllowMultipleReplicationSlotsOnTheSameDBSlotAndPlugin() thr
fail("Should not be able to create 2 replication connections on the same db, plugin and slot");
}
catch (Exception e) {
assertTrue(interceptor.containsWarnMessage("and retrying, attempt number 2 over 2"));
assertTrue(e.getCause().getMessage().contains("ERROR: replication slot \"test1\" is active"));
throw e;
}
}