From 4797e532e96ba2f4df082566cfdc4e3a833ebc60 Mon Sep 17 00:00:00 2001 From: Marcin Lewandowski Date: Mon, 26 Aug 2024 13:06:11 +0200 Subject: [PATCH] tuning flacky test --- .../client/test/server/replication/PullReplicationTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/java/net/ravendb/client/test/server/replication/PullReplicationTest.java b/src/test/java/net/ravendb/client/test/server/replication/PullReplicationTest.java index 05fdc5b4..b566defb 100644 --- a/src/test/java/net/ravendb/client/test/server/replication/PullReplicationTest.java +++ b/src/test/java/net/ravendb/client/test/server/replication/PullReplicationTest.java @@ -171,7 +171,7 @@ public void updatePullReplicationOnSink() throws Exception { String definitionName1 = "pull-replication " + hub.getDatabase(); String definitionName2 = "pull-replication " + hub2.getDatabase(); - int timeout = 3_000; + int timeout = 15_000; hub.maintenance().forDatabase(hub.getDatabase()).send(new PutPullReplicationAsHubOperation(definitionName1)); hub2.maintenance().forDatabase(hub2.getDatabase()).send(new PutPullReplicationAsHubOperation(definitionName2)); @@ -281,6 +281,8 @@ public void disablePullReplicationOnSink() throws Exception { addWatcherToReplicationTopology(sink, pull, hub.getUrls()); + Thread.sleep(500); // wait a bit to process updates + try (IDocumentSession main = hub.openSession()) { main.store(new User(), "hub/2"); main.saveChanges(); @@ -292,6 +294,8 @@ public void disablePullReplicationOnSink() throws Exception { pull.setDisabled(false); addWatcherToReplicationTopology(sink, pull, hub.getUrls()); + Thread.sleep(500); // wait a bit to process updates + try (IDocumentSession main = hub.openSession()) { main.store(new User(), "hub/3"); main.saveChanges();