Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created October 2, 2017 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/150e79cd30cf47ebac559dba5c718e3a to your computer and use it in GitHub Desktop.
Save zoffixznet/150e79cd30cf47ebac559dba5c718e3a to your computer and use it in GitHub Desktop.
zoffix@VirtualBox~/CPANPRC/rakudo (nom)$ t/fudgeandrun t/spec/S17-promise/nonblocking-await.t
t/spec/S17-promise/nonblocking-await.t ..
1..27
ok 1 - Recursion creating a deep await-tree completes correctly
1..3
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 3 - .message matches oopsy
ok 2 - Deep Promise tree conveys exception up to the top
ok 3 - Hundreds of time-based Promises awaited completes correctly
ok 4 - await of multiple Promises suspends until all ready
ok 5 - Hundred of await on time/manual Promise completes corectly
ok 6 - await of multiple Promises suspends until all ready
1..3
ok 1 - code dies
ok 2 - right exception type (X::AdHoc)
ok 3 - .message matches bust
ok 7 - Multiple await also conveys errors correctly
ok 8 - Hundred of outstanding awaits on supplies works
1..3
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 3 - .message matches strewth
ok 9 - Hundred of outstanding awaits on supplies that die works
ok 10 - Hundred of outstanding awaits on channels works
1..2
ok 1 - code dies
ok 2 - right exception type (X::Channel::ReceiveOnClosed)
ok 11 - Hundred of outstanding awaits on channels that gets closed works
ok 12 - Exception from awaiting broken Promise does X::Await::Died
ok 13 - Exception contains original exception message
ok 14 - Exception contains stack location where Promise code died
ok 15 - Exception contains stack location where we awaited
ok 16 - Exception from awaiting many things, where on dies, does X::Await::Died
ok 17 - Exception contains original exception message
ok 18 - Exception contains stack location where Promise code died
ok 19 - Exception contains stack location where we awaited
ok 20 - No error due to trying to do non-blocking await when lock held
ok 21 - No error due to trying to do non-blocking await when lock held
A react block:
in block at t/spec/S17-promise/nonblocking-await.t line 235
in block <unit> at t/spec/S17-promise/nonblocking-await.t line 218
Died because of the exception:
No such method 'rethrow' for invocant of type 'Str'
in block at t/spec/S17-promise/nonblocking-await.t line 235
in block <unit> at t/spec/S17-promise/nonblocking-await.t line 218
# Looks like you planned 27 tests, but ran 21
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 6/27 subtests
Test Summary Report
-------------------
t/spec/S17-promise/nonblocking-await.t (Wstat: 65280 Tests: 21 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 27 tests but ran 21.
Files=1, Tests=21, 23 wallclock secs ( 0.03 usr 0.00 sys + 2.82 cusr 0.23 csys = 3.08 CPU)
Result: FAIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment