File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,8 @@ class SignalSpec: QuickSpec {
235235 signal. observe { event in
236236 if !hasSlept {
237237 sema. signal ( )
238- sleep ( 5 )
238+ // 100000 us = 0.1 s
239+ usleep ( 100000 )
239240 hasSlept = true
240241 }
241242 events. append ( event)
@@ -271,7 +272,7 @@ class SignalSpec: QuickSpec {
271272 queue = DispatchQueue . global ( priority: . high)
272273 }
273274
274- let iterations = 100000
275+ let iterations = 1000
275276 let group = DispatchGroup ( )
276277
277278 queue. async ( group: group) {
@@ -300,7 +301,7 @@ class SignalSpec: QuickSpec {
300301 group. wait ( )
301302
302303 expect ( executionCounter. value) == iterations * 2
303- expect ( counter. value) . toEventually ( equal ( iterations) , timeout: 10 )
304+ expect ( counter. value) . toEventually ( equal ( iterations) , timeout: 5 )
304305 }
305306 }
306307
You can’t perform that action at this time.
0 commit comments