Skip to content

Commit

Permalink
Reduced the time spent in the failing test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
andersio committed Nov 26, 2016
1 parent 7b74aa1 commit 55c9537
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Tests/ReactiveSwiftTests/SignalSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ class SignalSpec: QuickSpec {
signal.observe { event in
if !hasSlept {
sema.signal()
sleep(5)
// 100000 us = 0.1 s
usleep(100000)
hasSlept = true
}
events.append(event)
Expand Down Expand Up @@ -271,7 +272,7 @@ class SignalSpec: QuickSpec {
queue = DispatchQueue.global(priority: .high)
}

let iterations = 100000
let iterations = 1000
let group = DispatchGroup()

queue.async(group: group) {
Expand Down Expand Up @@ -300,7 +301,7 @@ class SignalSpec: QuickSpec {
group.wait()

expect(executionCounter.value) == iterations * 2
expect(counter.value).toEventually(equal(iterations), timeout: 10)
expect(counter.value).toEventually(equal(iterations), timeout: 5)
}
}

Expand Down

0 comments on commit 55c9537

Please sign in to comment.