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 b2e8b48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/ReactiveSwiftTests/SignalSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class SignalSpec: QuickSpec {
signal.observe { event in
if !hasSlept {
sema.signal()
sleep(5)
usleep(UInt32(USEC_PER_SEC) >> 3)
hasSlept = true
}
events.append(event)
Expand Down Expand Up @@ -271,7 +271,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 +300,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 b2e8b48

Please sign in to comment.