benvanstaveren / Mojolicious-Plugin-Authentication

A plugin to make authentication a bit easier
http://search.cpan.org/dist/Mojolicious-Plugin-Authentication/
Other
20 stars 17 forks source link

t/01-functional.t started to fail (with Mojolicious 9.25?) #34

Closed eserte closed 2 years ago

eserte commented 2 years ago

My smoker systems started to report test failures on this module:

Mojo::Reactor::EV: I/O watcher failed: A response has already been rendered at /usr/perl5.32.1Dp/lib/site_perl/5.32.1/Mojolicious/Controller.pm line 154.
# Premature connection close

#   Failed test 'GET /condition/authonly'
#   at t/01-functional.t line 97.

#   Failed test '401 Unauthorized'
#   at t/01-functional.t line 97.
#          got: undef
#     expected: '401'

#   Failed test 'exact match for JSON Pointer "/message"'
#   at t/01-functional.t line 97.
#          got: undef
#     expected: 'Unauthorized'
Mojo::Reactor::EV: I/O watcher failed: A response has already been rendered at /usr/perl5.32.1Dp/lib/site_perl/5.32.1/Mojolicious/Controller.pm line 154.
# Premature connection close

#   Failed test 'GET /condition/authonly_p'
#   at t/01-functional.t line 111.

#   Failed test '401 Unauthorized'
#   at t/01-functional.t line 111.
#          got: undef
#     expected: '401'

#   Failed test 'exact match for JSON Pointer "/message"'
#   at t/01-functional.t line 111.
#          got: undef
#     expected: 'Unauthorized'
# Looks like you failed 6 tests of 44.
t/01-functional.t ....... 
Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/44 subtests 

Statistical analysis suggests that this problem happens if Mojolicious 9.25 is installed (theta=-1 means "bad"):

****************************************************************
Regression 'mod:Mojolicious'
****************************************************************
Name                   Theta          StdErr     T-stat
[0='const']           1.0000          0.0000    17777780555178522.00
[1='eq_8.12']         0.0000          0.0000       0.00
[2='eq_8.17']         0.0000          0.0000       0.00
[3='eq_8.58']         0.0000          0.0000       0.00
[4='eq_9.13']         0.0000          0.0000       0.00
[5='eq_9.15']         0.0000          0.0000       0.00
[6='eq_9.16']         0.0000          0.0000       0.88
[7='eq_9.17']         0.0000          0.0000       0.00
[8='eq_9.18']         0.0000          0.0000       0.00
[9='eq_9.19']         0.0000          0.0000       0.00
[10='eq_9.21']        0.0000          0.0000       0.00
[11='eq_9.22']        0.0000          0.0000       0.00
[12='eq_9.23']        0.0000          0.0000       1.77
[13='eq_9.24']        0.0000          0.0000       1.61
[14='eq_9.25']       -1.0000          0.0000    -17569846144089180.00

R^2= 1.000, N= 183, K= 15
****************************************************************
jjatria commented 2 years ago

Thanks for the report! I think I figured out why this is failing, or at least how to not trigger this condition. I've pushed a fix and will mint a new release shortly