tokuhirom / p6-HTTP-Server-Tiny

Web application server for Perl6
Artistic License 2.0
18 stars 10 forks source link

Tests fail on install #31

Closed MadcapJake closed 8 years ago

MadcapJake commented 8 years ago
$ panda install HTTP::Server::Tiny
==> Fetching HTTP::Server::Tiny
==> Building HTTP::Server::Tiny
==> Testing HTTP::Server::Tiny
t/02-server.t ........... ok
Saw 2 occurrences of deprecated code.
================================================================================
Sub from-json (from GLOBAL) seen at:
  t/04-get.t, line 34
Please use JSON::Fast, JSON::Tiny or JSON::Pretty from https://modules.perl6.org/ instead.
--------------------------------------------------------------------------------
Sub to-json (from GLOBAL) seen at:
  t/04-get.t, line 17
Please use JSON::Fast, JSON::Tiny or JSON::Pretty from https://modules.perl6.org/ instead.
--------------------------------------------------------------------------------
Please contact the author to have these occurrences of deprecated code
adapted, so that this message will disappear!
t/04-get.t .............. ok
t/05-post.t ............. ok

# Failed test at t/06-channel.t line 35
# expected: '123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100'
#      got: (Failure)
# Looks like you failed 1 test of 1
t/06-channel.t .......... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests 
t/07-io-handle.t ........ ok
t/08-long-req.t ......... ok
t/09-chunked-request.t .. ok
t/10-ise.t .............. ok
t/11-str.t .............. ok

# Failed test at t/12-supply.t line 32
# expected: '123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100'
#      got: (Failure)
# Looks like you failed 1 test of 1
t/12-supply.t ........... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests 

Test Summary Report
-------------------
t/06-channel.t        (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
t/12-supply.t         (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=10, Tests=11, 187 wallclock secs ( 0.06 usr  0.03 sys + 304.21 cusr  2.84 csys = 307.14 CPU)
Result: FAIL
The spawned process exited unsuccessfully (exit code: 1)
  in sub run-and-gather-output at /home/jrusso/.rakudobrew/moar-nom/install/share/perl6/site/sources/24811C576EF8F85E7672B26955C802BB2FC94675 (Panda::Common) line 85
  in block  at /home/jrusso/.rakudobrew/moar-nom/install/share/perl6/site/sources/48E2EB9144E069353B240AD2D147B48C65F70152 (Panda::Tester) line 22
  in sub indir at /home/jrusso/.rakudobrew/moar-nom/install/share/perl6/site/sources/24811C576EF8F85E7672B26955C802BB2FC94675 (Panda::Common) line 20
  in method test at /home/jrusso/.rakudobrew/moar-nom/install/share/perl6/site/sources/48E2EB9144E069353B240AD2D147B48C65F70152 (Panda::Tester) line 5
  in method install at /home/jrusso/.rakudobrew/moar-nom/install/share/perl6/site/sources/582CB7486602954A4601BDCE5A0EAC54B05DA58A (Panda) line 156
  in method resolve at /home/jrusso/.rakudobrew/moar-nom/install/share/perl6/site/sources/582CB7486602954A4601BDCE5A0EAC54B05DA58A (Panda) line 234
  in sub MAIN at /home/jrusso/.rakudobrew/moar-nom/install/share/perl6/site/resources/E0D978079BB5081DE986D058BB8AB08252F05CC8 line 18
  in block <unit> at /home/jrusso/.rakudobrew/moar-nom/install/share/perl6/site/resources/E0D978079BB5081DE986D058BB8AB08252F05CC8 line 152
retupmoca commented 8 years ago

06-channel.t at least (I didn't try 12-supply.t) seems to be some kind of interaction between HTTP::Server::Tiny and HTTP::Tinyish. If I run the same HTTP::Server::Tiny as the test file does and query it from a separate process (wget or even another perl6 running HTTP::Tinyish the same was as the test file), then everything works as expected. It seems to only be an issue when the two are run from within the same perl6 process.

zoffixznet commented 8 years ago

The issue still exists. When I ran the tests with prove they actually hung. I then went to the browser to the URL printed by the test and in the browser it printed

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100

And the tests then appear to have crashed. I then ran it again (output lower below) and the channel tests simply failed, but then later tests crashed.

zoffix@VirtualBox:~/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332$ prove -e 'perl6 -Ilib' -vlr t
t/02-server.t ........... 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14645)
ok 1 - 
ok
t/04-get.t .............. 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14657)
ok 1 - 
Saw 2 occurrences of deprecated code.
================================================================================
Sub from-json (from GLOBAL) seen at:
  t/04-get.t, line 34
Please use JSON::Fast, JSON::Tiny or JSON::Pretty from https://modules.perl6.org/ instead.
--------------------------------------------------------------------------------
Sub to-json (from GLOBAL) seen at:
  t/04-get.t, line 17
Please use JSON::Fast, JSON::Tiny or JSON::Pretty from https://modules.perl6.org/ instead.
--------------------------------------------------------------------------------
Please contact the author to have these occurrences of deprecated code
adapted, so that this message will disappear!
ok
t/05-post.t ............. 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14671)
ok 1 - 
ok
t/06-channel.t .......... 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14686)
not ok 1 - 
[ERROR] [14686] [4] broken pipe   in method throw at gen/moar/m-CORE.setting line 22339
  in method result at gen/moar/m-CORE.setting line 33429
  in sub await at gen/moar/m-CORE.setting line 35422
  in block  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 332
  in block  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 330
  in block  at gen/moar/m-CORE.setting line 4593
  in method sink-all at gen/moar/m-CORE.setting line 4575
  in method sink at gen/moar/m-CORE.setting line 13600
  in method send-response at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 327
  in method run-app at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 256
  in block  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 181
  in method parse-body at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 167
  in method handle at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 88
  in block  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 503
  in block  at gen/moar/m-CORE.setting line 33904
  in block  at gen/moar/m-CORE.setting line 33875
  in method protect at gen/moar/m-CORE.setting line 32995
  in block  at gen/moar/m-CORE.setting line 33875
  in block  at gen/moar/m-CORE.setting line 35118
  in method emit at gen/moar/m-CORE.setting line 35115
  in method emit at gen/moar/m-CORE.setting line 35155
  in block  at gen/moar/m-CORE.setting line 35702
  in method emit-events at gen/moar/m-CORE.setting line 3272
  in block  at gen/moar/m-CORE.setting line 3260
  in block  at gen/moar/m-CORE.setting line 3255
  in method protect at gen/moar/m-CORE.setting line 32995
  in method process at gen/moar/m-CORE.setting line 3252
  in block  at gen/moar/m-CORE.setting line 35705
  in block  at gen/moar/m-CORE.setting line 33139
  in block  at gen/moar/m-CORE.setting line 33136
  in block  at gen/moar/m-CORE.setting line 33135
  in block  at gen/moar/m-CORE.setting line 33132

# Failed test at t/06-channel.t line 35[ERROR] [14686] [6] broken pipe   in method throw at gen/moar/m-CORE.setting line 22339
  in method result at gen/moar/m-CORE.setting line 33429
  in block  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 330
  in block  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 330
  in block  at gen/moar/m-CORE.setting line 4593
  in method sink-all at gen/moar/m-CORE.setting line 4575
  in method sink at gen/moar/m-CORE.setting line 13600
  in method send-response at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 327
  in method run-app at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 256
  in block  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 219
  in method parse-body at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 167
  in method handle at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 88
  in block  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 503
  in block  at gen/moar/m-CORE.setting line 33904
  in block  at gen/moar/m-CORE.setting line 33875
  in method protect at gen/moar/m-CORE.setting line 32997
  in block  at gen/moar/m-CORE.setting line 33875
  in block  at gen/moar/m-CORE.setting line 35118
  in method emit at gen/moar/m-CORE.setting line 35115
  in method emit at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm line 1
  in block  at gen/moar/m-CORE.setting line 35702
  in method emit-events at gen/moar/m-CORE.setting line 3272
  in block  at gen/moar/m-CORE.setting line 3260
  in block  at gen/moar/m-CORE.setting line 3255
  in method protect at gen/moar/m-CORE.setting line 32997
  in method process at gen/moar/m-CORE.setting line 3252
  in block  at gen/moar/m-CORE.setting line 35705
  in block  at gen/moar/m-CORE.setting line 33139
  in block  at gen/moar/m-CORE.setting line 33135
  in block  at gen/moar/m-CORE.setting line 33135
  in block  at gen/moar/m-CORE.setting line 33132
^C
zoffix@VirtualBox:~/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332$ ^C
zoffix@VirtualBox:~/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332$ prove -e 'perl6 -Ilib' -vlr t
t/02-server.t ........... 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14723)
ok 1 - 
ok
t/04-get.t .............. 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14735)
ok 1 - 
Saw 2 occurrences of deprecated code.
================================================================================
Sub from-json (from GLOBAL) seen at:
  t/04-get.t, line 34
Please use JSON::Fast, JSON::Tiny or JSON::Pretty from https://modules.perl6.org/ instead.
--------------------------------------------------------------------------------
Sub to-json (from GLOBAL) seen at:
  t/04-get.t, line 17
Please use JSON::Fast, JSON::Tiny or JSON::Pretty from https://modules.perl6.org/ instead.
--------------------------------------------------------------------------------
Please contact the author to have these occurrences of deprecated code
adapted, so that this message will disappear!
ok
t/05-post.t ............. 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14749)
ok 1 - 
ok
t/06-channel.t .......... 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14763)
not ok 1 - 

# Failed test at t/06-channel.t line 35
# expected: '123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100'
#      got: (Failure)
# Looks like you failed 1 test of 1
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests 
t/07-io-handle.t ........ 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14852)
ok 1 - 
ok
t/08-long-req.t ......... 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14867)
ok 1 - 
ok
t/09-chunked-request.t .. 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14879)
# wrote requests
ok 1 - 
ok
t/10-ise.t .............. 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14892)
[ERROR] [14892] [4] Died   in method throw at gen/moar/m-CORE.setting line 22339
  in sub die at gen/moar/m-CORE.setting line 753
  in sub  at t/10-ise.t line 16
  in sub  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 249
  in method run-app at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 242
  in block  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 219
  in method parse-body at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 167
  in method handle at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 88
  in block  at /home/zoffix/.zef/store/p6-HTTP-Server-Tiny.git/62db56d08617c87859a25a687dd6966699db4332/lib/HTTP/Server/Tiny.pm6 line 503
  in block  at gen/moar/m-CORE.setting line 33904
  in block  at gen/moar/m-CORE.setting line 33875
  in method protect at gen/moar/m-CORE.setting line 32995
  in block  at gen/moar/m-CORE.setting line 33875
  in block  at gen/moar/m-CORE.setting line 35118
  in method emit at gen/moar/m-CORE.setting line 35115
  in method emit at gen/moar/m-CORE.setting line 35155
  in block  at gen/moar/m-CORE.setting line 35702
  in method emit-events at gen/moar/m-CORE.setting line 3272
  in block  at gen/moar/m-CORE.setting line 3260
  in block  at gen/moar/m-CORE.setting line 3255
  in method protect at gen/moar/m-CORE.setting line 32995
  in method process at gen/moar/m-CORE.setting line 3252
  in block  at gen/moar/m-CORE.setting line 35705
  in block  at gen/moar/m-CORE.setting line 33139
  in block  at gen/moar/m-CORE.setting line 33136
  in block  at gen/moar/m-CORE.setting line 33135
  in block  at gen/moar/m-CORE.setting line 33132
ok 1 - 
ok
t/11-str.t .............. 
1..2
http server is ready: http://127.0.0.1:15555/ (pid:14906)
ok 1 - 
ok 2 - 
ok
t/12-supply.t ........... 
1..1
http server is ready: http://127.0.0.1:15555/ (pid:14924)