File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1515@testable import APNSCore
1616import Crypto
1717import XCTest
18+ import NIOConcurrencyHelpers
1819
1920final class APNSAuthenticationTokenManagerTests : XCTestCase {
2021 private static let signingKey = """
@@ -129,11 +130,19 @@ final class TestClock<Duration: DurationProtocol & Hashable>: Clock {
129130 }
130131
131132 let minimumResolution : Duration = . zero
132- var now : Instant
133+ private let _now : NIOLockedValueBox < Instant >
134+
135+ var now : Instant {
136+ get {
137+ self . _now. withLockedValue { $0 }
138+ } set {
139+ self . _now. withLockedValue { $0 = newValue }
140+ }
141+ }
133142
134143
135144 public init ( now: Instant = . init( ) ) {
136- self . now = . init( )
145+ self . _now = . init( now )
137146 }
138147
139148 public func sleep( until deadline: Instant , tolerance: Duration ? = nil ) async throws {
You can’t perform that action at this time.
0 commit comments