Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Oct 21, 2024
1 parent d0ab1fa commit dc0c2f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ struct DispatchQueueSchedulerTests {
}

@Test func scheduleRepeatingTask() async throws {
try await confirmation(expectedCount: 3) { confirm in
let delay = 0.5
try await confirmation(expectedCount: 2) { confirm in
let delay = 1.5
let now = Date()
let executionTimes = ThreadSafeContainer<[Date]>([])
let expectedExecutions = 3
let expectedExecutions = 2

let cancel = scheduler.schedule(delay: delay, repeats: true) {
executionTimes.value.append(Date())
confirm()
}

try await Task.sleep(for: .seconds(1.6))
try await Task.sleep(for: .seconds(3.1))

_ = cancel

Expand Down Expand Up @@ -83,13 +83,13 @@ struct DispatchQueueSchedulerTests {

@Test func cancelRepeatingTask() async throws {
try await confirmation(expectedCount: 2) { confirm in
let delay = 0.5
let delay = 1.0

let cancel = scheduler.schedule(delay: delay, repeats: true) {
confirm()
}

try await Task.sleep(for: .seconds(1.2))
try await Task.sleep(for: .seconds(2.2))

cancel.cancel()

Expand Down
2 changes: 1 addition & 1 deletion Networking/Sources/MsQuicSwift/NetAddr.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extension NetAddr: Equatable {
public static func == (lhs: NetAddr, rhs: NetAddr) -> Bool {
var addr1 = lhs.quicAddr
var addr2 = rhs.quicAddr
return QuicAddrCompare(&addr1, &addr2) == 0
return QuicAddrCompare(&addr1, &addr2) == 1
}
}

Expand Down

0 comments on commit dc0c2f7

Please sign in to comment.