diff --git a/Tests/VergeTests/StoreReaderTests.swift b/Tests/VergeTests/StoreReaderTests.swift index 51a9270afa..b883a98dd3 100644 --- a/Tests/VergeTests/StoreReaderTests.swift +++ b/Tests/VergeTests/StoreReaderTests.swift @@ -142,30 +142,30 @@ final class StoreReaderTests: XCTestCase { XCTAssertEqual(count, 1) - try await Task.sleep(nanoseconds: 1) - + try await Task.sleep(nanoseconds: 1_000_000) + store.commit { $0.count_1 += 1 } - try await Task.sleep(nanoseconds: 1) - - XCTAssertEqual(count, 2) - + try await Task.sleep(nanoseconds: 1_000_000) + + XCTAssertEqual(count, 3) + store.commit { $0.count_1 += 1 } - try await Task.sleep(nanoseconds: 1) - - XCTAssertEqual(count, 3) - + try await Task.sleep(nanoseconds: 1_000_000) + + XCTAssertEqual(count, 4) + store.commit { $0.count_1 += 1 } - try await Task.sleep(nanoseconds: 1) - XCTAssertEqual(count, 4) + try await Task.sleep(nanoseconds: 1_000_000) + XCTAssertEqual(count, 5) } @@ -212,31 +212,31 @@ final class StoreReaderTests: XCTestCase { XCTAssertEqual(count, 1) - try await Task.sleep(nanoseconds: 1) - + try await Task.sleep(nanoseconds: 1_000_000) + store.commit { $0.wrapped += 1 } - try await Task.sleep(nanoseconds: 1) - - XCTAssertEqual(count, 2) - + try await Task.sleep(nanoseconds: 1_000_000) + + XCTAssertEqual(count, 3) + store.commit { $0.wrapped += 1 } - try await Task.sleep(nanoseconds: 1) - - XCTAssertEqual(count, 3) - + try await Task.sleep(nanoseconds: 1_000_000) + + XCTAssertEqual(count, 4) + store.commit { $0.wrapped += 1 } - try await Task.sleep(nanoseconds: 1) - XCTAssertEqual(count, 4) - + try await Task.sleep(nanoseconds: 1_000_000) + XCTAssertEqual(count, 5) + } @MainActor @@ -282,31 +282,31 @@ final class StoreReaderTests: XCTestCase { XCTAssertEqual(count, 1) - try await Task.sleep(nanoseconds: 1) - + try await Task.sleep(nanoseconds: 1_000_000) + store.commit { $0.count_1 += 1 } - try await Task.sleep(nanoseconds: 1) - - XCTAssertEqual(count, 2) - + try await Task.sleep(nanoseconds: 1_000_000) + + XCTAssertEqual(count, 3) + store.commit { $0.count_1 += 1 } - try await Task.sleep(nanoseconds: 1) - - XCTAssertEqual(count, 3) - + try await Task.sleep(nanoseconds: 1_000_000) + + XCTAssertEqual(count, 4) + store.commit { $0.count_1 += 1 } - try await Task.sleep(nanoseconds: 1) - XCTAssertEqual(count, 4) - + try await Task.sleep(nanoseconds: 1_000_000) + XCTAssertEqual(count, 5) + } @@ -325,31 +325,31 @@ final class StoreReaderTests: XCTestCase { XCTAssertEqual(count, 1) - try await Task.sleep(nanoseconds: 1) - + try await Task.sleep(nanoseconds: 1_000_000) + store.commit { $0.count_1 += 1 } - try await Task.sleep(nanoseconds: 1) - - XCTAssertEqual(count, 2) - + try await Task.sleep(nanoseconds: 1_000_000) + + XCTAssertEqual(count, 3) + store.commit { $0.count_1 += 1 } - try await Task.sleep(nanoseconds: 1) - - XCTAssertEqual(count, 3) - + try await Task.sleep(nanoseconds: 1_000_000) + + XCTAssertEqual(count, 4) + store.commit { $0.count_1 += 1 } - try await Task.sleep(nanoseconds: 1) - XCTAssertEqual(count, 4) - + try await Task.sleep(nanoseconds: 1_000_000) + XCTAssertEqual(count, 5) + } private struct NonEquatableBox {