Skip to content

Commit b2e8b48

Browse files
committed
Reduced the time spent in the failing test cases.
1 parent 7b74aa1 commit b2e8b48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/ReactiveSwiftTests/SignalSpec.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class SignalSpec: QuickSpec {
235235
signal.observe { event in
236236
if !hasSlept {
237237
sema.signal()
238-
sleep(5)
238+
usleep(UInt32(USEC_PER_SEC) >> 3)
239239
hasSlept = true
240240
}
241241
events.append(event)
@@ -271,7 +271,7 @@ class SignalSpec: QuickSpec {
271271
queue = DispatchQueue.global(priority: .high)
272272
}
273273

274-
let iterations = 100000
274+
let iterations = 1000
275275
let group = DispatchGroup()
276276

277277
queue.async(group: group) {
@@ -300,7 +300,7 @@ class SignalSpec: QuickSpec {
300300
group.wait()
301301

302302
expect(executionCounter.value) == iterations * 2
303-
expect(counter.value).toEventually(equal(iterations), timeout: 10)
303+
expect(counter.value).toEventually(equal(iterations), timeout: 5)
304304
}
305305
}
306306

0 commit comments

Comments
 (0)