Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
MacOMNI committed Nov 14, 2024
1 parent 018fed5 commit 7b3cd78
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Networking/Tests/NetworkingTests/PeerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,10 @@ struct PeerTests {
let con = try peer.connect(to: centerPeer.listenAddress(), role: .builder)
try await con.ready()
}
try? await Task.sleep(for: .milliseconds(2000))
// Simulate close connections 3~5s
try? await Task.sleep(for: .milliseconds(5000))
centerPeer.broadcast(kind: .uniqueA, message: .init(kind: .uniqueA, data: Data("connection rotation strategy".utf8)))
try? await Task.sleep(for: .milliseconds(200))
try? await Task.sleep(for: .milliseconds(1000))
var receivedCount = 0
for handler in handlers {
receivedCount += await handler.receivedData.count
Expand Down

0 comments on commit 7b3cd78

Please sign in to comment.