Skip to content

Commit

Permalink
update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
MacOMNI committed Nov 4, 2024
1 parent f0e1b04 commit d156214
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Networking/Tests/NetworkingTests/MockPeerEventTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ final class MockPeerEventTests {
configuration: clientConfiguration
)

try? await Task.sleep(for: .milliseconds(100))
await #expect(throws: Error.self) {
try clientConnection.connect(to: listenAddress)
try? await Task.sleep(for: .milliseconds(200))
try? await Task.sleep(for: .milliseconds(50))
try clientConnection.connect(to: listenAddress)
try? await Task.sleep(for: .milliseconds(1000))
#expect(throws: Error.self) {
let stream1 = try clientConnection.createStream()
try stream1.send(data: Data("test data 1".utf8))
}
Expand Down Expand Up @@ -253,10 +253,9 @@ final class MockPeerEventTests {
registration: registration,
configuration: clientConfiguration
)
try? await Task.sleep(for: .milliseconds(100))
await #expect(throws: Error.self) {
try clientConnection.connect(to: listenAddress)
try? await Task.sleep(for: .milliseconds(200))
try clientConnection.connect(to: listenAddress)
try? await Task.sleep(for: .milliseconds(1000))
#expect(throws: Error.self) {
let stream1 = try clientConnection.createStream()
try stream1.send(data: Data("test data 1".utf8))
}
Expand Down

0 comments on commit d156214

Please sign in to comment.