Skip to content

Commit

Permalink
Fix race in test
Browse files Browse the repository at this point in the history
  • Loading branch information
gh123man committed Apr 10, 2024
1 parent bf8969e commit 4dd5591
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/AsyncChannelsTests/AsyncChannelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ final class AsyncTest: XCTestCase {
func testSelectDefault() async {
let c = Channel<String>(capacity: 3)
let d = Channel<String>(capacity: 3)
let validate = Channel<Bool>()
let validate = Channel<Bool>(capacity: 1)
let resume = Channel<Bool>()

Task {
Expand All @@ -253,8 +253,8 @@ final class AsyncTest: XCTestCase {
}
}

Task { await drain() }
Task { await drain() }
await drain()
await drain()

await assertChanRx(validate, true)
XCTAssertEqual(cCall, 1)
Expand Down

0 comments on commit 4dd5591

Please sign in to comment.