From 018fed5f1183a4464692ceb7fc19aa712c87a825 Mon Sep 17 00:00:00 2001 From: MacOMNI <414294494@qq.com> Date: Thu, 14 Nov 2024 15:09:47 +0800 Subject: [PATCH] update peer test --- Networking/Tests/NetworkingTests/PeerTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Networking/Tests/NetworkingTests/PeerTests.swift b/Networking/Tests/NetworkingTests/PeerTests.swift index 7eec34ba..6bb1157a 100644 --- a/Networking/Tests/NetworkingTests/PeerTests.swift +++ b/Networking/Tests/NetworkingTests/PeerTests.swift @@ -184,13 +184,13 @@ struct PeerTests { let con = try peer.connect(to: centerPeer.listenAddress(), role: .builder) try await con.ready() } + try? await Task.sleep(for: .milliseconds(2000)) centerPeer.broadcast(kind: .uniqueA, message: .init(kind: .uniqueA, data: Data("connection rotation strategy".utf8))) - try? await Task.sleep(for: .milliseconds(500)) + try? await Task.sleep(for: .milliseconds(200)) var receivedCount = 0 for handler in handlers { receivedCount += await handler.receivedData.count } - print("recievedCount: \(receivedCount)") #expect(receivedCount == PeerSettings.defaultSettings.maxBuilderConnections) }