diff --git a/driver-core/src/test/java/com/datastax/driver/core/ScyllaSniProxyTest.java b/driver-core/src/test/java/com/datastax/driver/core/ScyllaSniProxyTest.java index 84513ba7dfc..32c56c0d819 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ScyllaSniProxyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ScyllaSniProxyTest.java @@ -69,6 +69,10 @@ public void onTableAdded(TableMetadata table) { // Sometimes (probably due to reconnection) both events can be read twice // assertingListener ensures we deal with the same keyspace and table + try { + Thread.sleep(1000); + } catch (InterruptedException ignored) { + } verify(listener, atLeast(1)).onTableAdded(any(TableMetadata.class)); verify(listener, atMost(2)).onTableAdded(any(TableMetadata.class)); verify(listener, atLeast(1)).onKeyspaceAdded(any(KeyspaceMetadata.class));