Skip to content

Commit d84d13e

Browse files
committed
Fix spec timing
1 parent 04e9390 commit d84d13e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

spec/concurrent/edge/erlang_actor_spec.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,12 @@
488488
body = { on_thread:
489489
-> do
490490
spawn(link: true) { raise 'err' }
491-
receive(timeout: 0.01)
491+
receive(timeout: 1)
492492
end,
493493
on_pool:
494494
-> do
495495
spawn(link: true) { raise 'err' }
496-
receive(on(ANY) { |v| [v, b] },
497-
on(TIMEOUT) { |v| [nil, b] },
498-
timeout: 0.01)
496+
receive(timeout: 1) { |v| v }
499497
end }
500498

501499
a = Concurrent::ErlangActor.spawn(type: type, &body.fetch(type))
@@ -534,15 +532,15 @@
534532
-> do
535533
b = spawn(link: true) { throw :uncaught }
536534
trap
537-
[receive(timeout: 0.01), b]
535+
[receive(timeout: 1), b]
538536
end,
539537
on_pool:
540538
-> do
541539
b = spawn(link: true) { throw :uncaught }
542540
trap
543541
receive(on(ANY) { |v| [v, b] },
544542
on(TIMEOUT) { |v| [nil, b] },
545-
timeout: 0.01)
543+
timeout: 1)
546544
end }
547545

548546
a = Concurrent::ErlangActor.spawn(type: type, &body.fetch(type))

0 commit comments

Comments
 (0)