jhthorsen / json-validator

:cop: Validate data against a JSON schema
https://metacpan.org/release/JSON-Validator
56 stars 57 forks source link

t/-keyword-draft*.t fail with newer Mojolicious #242

Closed eserte closed 3 years ago

eserte commented 3 years ago

The test suite started to fail:

#   Failed test '200 OK'
#   at t/id-keyword-draft4.t line 16.
#          got: '404'
#     expected: '200'

#   Failed test 'http://127.0.0.1:26820/relative-to-the-root.json'
#   at t/id-keyword-draft4.t line 24.
# Not Found at /usr/home/cpansand/.cpan/build/2021032220/JSON-Validator-4.14-2/blib/lib/JSON/Validator/Store.pm line 123.

#   Failed test 'undef isa 'JSON::Validator::Schema::Draft4''
#   at t/id-keyword-draft4.t line 25.
#     undef isn't defined
Can't call method "moniker" on an undefined value at t/id-keyword-draft4.t line 28.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 6.
t/id-keyword-draft4.t .................. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 3/6 subtests 

#   Failed test '200 OK'
#   at t/id-keyword-draft7.t line 16.
#          got: '404'
#     expected: '200'

#   Failed test 'http://127.0.0.1:26823/schema.json'
#   at t/id-keyword-draft7.t line 20.
# Not Found at /usr/home/cpansand/.cpan/build/2021032220/JSON-Validator-4.14-2/blib/lib/JSON/Validator/Store.pm line 123.

#   Failed test 'undef isa 'JSON::Validator::Schema::Draft7''
#   at t/id-keyword-draft7.t line 21.
#     undef isn't defined
Can't call method "id" on an undefined value at t/id-keyword-draft7.t line 24.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 5.
t/id-keyword-draft7.t .................. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 3/5 subtests 

Statistical analysis suggests that this happens with newer Mojolicious versions (e.g. 9.11 and newer):

****************************************************************
Regression 'mod:Mojolicious'
****************************************************************
Name                   Theta          StdErr     T-stat
[0='const']           1.0000          0.0000    7385202895849018.00
[1='eq_8.09']         0.0000          0.0000       6.96
[2='eq_8.12']         0.0000          0.0000       9.37
[3='eq_8.17']         0.0000          0.0000       7.83
[4='eq_8.40']         0.0000          0.0000       7.54
[5='eq_8.41']         0.0000          0.0000       8.03
[6='eq_8.43']         0.0000          0.0000       8.12
[7='eq_8.58']         0.0000          0.0000       8.70
[8='eq_8.73']         0.0000          0.0000       9.09
[9='eq_9.0']          0.0000          0.0000       9.66
[10='eq_9.01']        0.0000          0.0000      13.04
[11='eq_9.02']        0.0000          0.0000       6.07
[12='eq_9.11']       -1.0000          0.0000    -6605526281098681.00
[13='eq_9.12']       -1.0000          0.0000    -7006218640006251.00
[14='eq_9.13']       -1.0000          0.0000    -7329040842032270.00

R^2= 1.000, N= 194, K= 15
****************************************************************
abraxxa commented 3 years ago

Same here.

jhthorsen commented 3 years ago

This has been fixed by @abraxxa. I will make a release soon.