Skip to content
This repository was archived by the owner on May 13, 2020. It is now read-only.

Commit 5a51b9a

Browse files
committed
tests: fix Store synchronicity test
1 parent 73d70a2 commit 5a51b9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RxReduceTests/StoreTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ final class StoreTests: XCTestCase {
210210
func userReducer (state: TestState, action: Action) -> UserState {
211211
if case let AppAction.logUser(user) = action {
212212
firstReducerStartTime = DispatchTime.now()
213-
_ = sem.wait(timeout: DispatchTime(uptimeNanoseconds: 1000000000))
213+
_ = sem.wait(timeout: .now() + 1)
214214
exp.fulfill()
215215
firstReducerEndTime = DispatchTime.now()
216216
return UserState.loggedIn(name: user)
@@ -221,7 +221,7 @@ final class StoreTests: XCTestCase {
221221
func counterReducer (state: TestState, action: Action) -> CounterState {
222222
if case let AppAction.increase(increment) = action {
223223
secondReducerStartTime = DispatchTime.now()
224-
_ = sem.wait(timeout: DispatchTime(uptimeNanoseconds: 1000000000))
224+
_ = sem.wait(timeout: .now() + 1)
225225
exp.fulfill()
226226
secondReducerEndTime = DispatchTime.now()
227227
return CounterState.increasing(increment)

0 commit comments

Comments
 (0)