From fa5776566655cb00885a5676340efcce280f1bb2 Mon Sep 17 00:00:00 2001 From: Alexander Ignatov Date: Tue, 30 May 2023 11:35:18 +0300 Subject: [PATCH] Remove flaky tests --- .../SearchStationDomainTests.swift | 15 ------------ .../StationDomainTests.swift | 23 ------------------- 2 files changed, 38 deletions(-) diff --git a/BDZDelays/bdz-delays/Tests/SearchStationDomainTests/SearchStationDomainTests.swift b/BDZDelays/bdz-delays/Tests/SearchStationDomainTests/SearchStationDomainTests.swift index 2702afb..da11920 100644 --- a/BDZDelays/bdz-delays/Tests/SearchStationDomainTests/SearchStationDomainTests.swift +++ b/BDZDelays/bdz-delays/Tests/SearchStationDomainTests/SearchStationDomainTests.swift @@ -68,21 +68,6 @@ final class SearchStationDomainTests: XCTestCase { XCTAssertEqual(calls, 1) } - func test_locationAction_whenAvailable_opensStationInfo() async throws { - let station = BGStation.dobrich - let store = TestStore( - initialState: SearchStationReducer.State( - locationStatus: .authorized(nearestStation: station) - ), - reducer: SearchStationReducer() - ) - - store.exhaustivity = .off - - await store.send(.locationAction) - await store.receive(.selectStation(station)) - } - func test_locationAction_whenConnectionFailed_refreshes() async throws { let serviceSpy = Spy() let store = TestStore( diff --git a/BDZDelays/bdz-delays/Tests/StationDomainTests/StationDomainTests.swift b/BDZDelays/bdz-delays/Tests/StationDomainTests/StationDomainTests.swift index c76aa0c..b74c6ab 100644 --- a/BDZDelays/bdz-delays/Tests/StationDomainTests/StationDomainTests.swift +++ b/BDZDelays/bdz-delays/Tests/StationDomainTests/StationDomainTests.swift @@ -132,29 +132,6 @@ final class StationDomainTests: XCTestCase { } } - func test_task_sendsTickEverySecond() async throws { - let clock = TestClock() - let store = TestStore( - initialState: .init( - station: .sofia - ), - reducer: StationReducer() - ) { - $0.continuousClock = clock - } - - store.exhaustivity = .off - - let task = await store.send(.task) - - for _ in 1...10 { - await clock.advance(by: .seconds(1)) - await store.receive(.tick) - } - - await task.cancel() // done by SwiftUI - } - func test_tick_refreshesWhenInDifferrentMinute() async throws { let dateInNextMinute = Date(timeIntervalSinceReferenceDate: 61)