From 29c77721d5b806ac39fa63d4aa042bdf08ddd701 Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Fri, 25 Sep 2020 12:36:41 +0900 Subject: [PATCH] =test harden test_gossip_shouldEventuallyStopSpreading which was too aggressive --- .../CRDT/CRDTGossipReplicationClusteredTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/DistributedActorsTests/CRDT/CRDTGossipReplicationClusteredTests.swift b/Tests/DistributedActorsTests/CRDT/CRDTGossipReplicationClusteredTests.swift index 82ec52c42..1bfd774dd 100644 --- a/Tests/DistributedActorsTests/CRDT/CRDTGossipReplicationClusteredTests.swift +++ b/Tests/DistributedActorsTests/CRDT/CRDTGossipReplicationClusteredTests.swift @@ -220,7 +220,7 @@ final class CRDTGossipReplicationClusteredTests: ClusteredActorSystemsXCTestCase func test_gossip_shouldEventuallyStopSpreading() throws { let configure: (inout ActorSystemSettings) -> Void = { settings in - settings.crdt.gossipInterval = .milliseconds(300) + settings.crdt.gossipInterval = .milliseconds(200) settings.crdt.gossipIntervalRandomFactor = 0 // no random factor, exactly 1second intervals } let first = self.setUpNode("first", configure) @@ -259,7 +259,7 @@ final class CRDTGossipReplicationClusteredTests: ClusteredActorSystemsXCTestCase let logs: [CapturedLogMessage] = self.capturedLogs(of: first) .grep("Received gossip", metadata: ["gossip/identity": "counter"]) - guard logs.count < 5 else { + guard logs.count < 10 else { throw testKit.error("Received gossip more times than expected! Logs: \(lineByLine: logs)") } }