Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Test::JSON::Schema::Acceptance from 1.005 to 1.006 causes t/draft2019-09-acceptance.t to fail #245

Closed
Ovid opened this issue Apr 11, 2021 · 1 comment
Assignees

Comments

@Ovid
Copy link

Ovid commented Apr 11, 2021

  • JSON::Validator version: 4.16
  • Perl version: 5.26.2
  • Operating system: MacOS 11.2.2 and Debian (unknown)

Because this is caused by the upgrading of a module not in this distribution, I reported the error in that module. However, Karen states that the code did not change between 1.005 and 1.006 and asked that I report the error here.

Steps to reproduce the behavior

Run this shell script:

#!/usr/bin/env bash

set -x

git clone git@github.com:jhthorsen/json-validator.git
cd json-validator

cpanm https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-JSON-Schema-Acceptance-1.006.tar.gz
TEST_ACCEPTANCE=1 prove -l t/draft2019-09-acceptance.t

cpanm https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-JSON-Schema-Acceptance-1.005.tar.gz
TEST_ACCEPTANCE=1 prove -l t/draft2019-09-acceptance.t

And you get the following output (notice that the test fails for the 1.006 and passes for 1.005):

$ ./test.sh
+ git clone git@github.com:jhthorsen/json-validator.git
Cloning into 'json-validator'...
remote: Enumerating objects: 102, done.
remote: Counting objects: 100% (102/102), done.
remote: Compressing objects: 100% (64/64), done.
remote: Total 8112 (delta 46), reused 70 (delta 27), pack-reused 8010
Receiving objects: 100% (8112/8112), 3.80 MiB | 4.67 MiB/s, done.
Resolving deltas: 100% (4751/4751), done.
+ cd json-validator
+ cpanm https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-JSON-Schema-Acceptance-1.006.tar.gz
--> Working on https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-JSON-Schema-Acceptance-1.006.tar.gz
Fetching https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-JSON-Schema-Acceptance-1.006.tar.gz ... OK
Configuring Test-JSON-Schema-Acceptance-1.006 ... OK
Building and testing Test-JSON-Schema-Acceptance-1.006 ... OK
Successfully installed Test-JSON-Schema-Acceptance-1.006
1 distribution installed
+ TEST_ACCEPTANCE=1
+ prove -l t/draft2019-09-acceptance.t
t/draft2019-09-acceptance.t .. 144/?     # Failed test 'test failed'
    # at t/Helper.pm line 47.
    # expected false; got true
# Failed test 'defs.json: "validate definition against metaschema" - "invalid definition schema"'
# at t/Helper.pm line 47.
t/draft2019-09-acceptance.t .. 944/? # Looks like you failed 1 test of 987.
t/draft2019-09-acceptance.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/987 subtests
        (136 TODO tests unexpectedly succeeded)

Test Summary Report
-------------------
t/draft2019-09-acceptance.t (Wstat: 256 Tests: 987 Failed: 1)
  Failed test:  192
  TODO passed:   63-64, 145-148, 660-691, 712, 723, 726-727
                830-923
  Non-zero exit status: 1
Files=1, Tests=987, 20 wallclock secs ( 0.20 usr  0.02 sys + 18.12 cusr  0.67 csys = 19.01 CPU)
Result: FAIL
+ cpanm https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-JSON-Schema-Acceptance-1.005.tar.gz
--> Working on https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-JSON-Schema-Acceptance-1.005.tar.gz
Fetching https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-JSON-Schema-Acceptance-1.005.tar.gz ... OK
Configuring Test-JSON-Schema-Acceptance-1.005 ... OK
Building and testing Test-JSON-Schema-Acceptance-1.005 ... OK
Successfully installed Test-JSON-Schema-Acceptance-1.005
1 distribution installed
+ TEST_ACCEPTANCE=1
+ prove -l t/draft2019-09-acceptance.t
t/draft2019-09-acceptance.t .. ok
All tests successful.

Test Summary Report
-------------------
t/draft2019-09-acceptance.t (Wstat: 0 Tests: 977 Failed: 0)
  TODO passed:   63-64, 145-148, 192, 660-691, 712, 723
                726-727, 830-913
Files=1, Tests=977, 20 wallclock secs ( 0.20 usr  0.01 sys + 18.14 cusr  0.64 csys = 18.99 CPU)
Result: PASS

Expected behavior

After upgrading Test::JSON::Schema::Acceptance from 1.005 to 1.006, I expect t/draft2019-09-acceptance.t to pass

Actual behavior

After upgrading Test::JSON::Schema::Acceptance from 1.005 to 1.006,t/draft2019-09-acceptance.t failed with:

t/draft2019-09-acceptance.t .. 177/?     # Failed test 'test failed'
    # at t/Helper.pm line 47.
    # expected false; got true

# Failed test 'defs.json: "validate definition against metaschema" - "invalid definition schema"'
@jhthorsen
Copy link
Owner

Unfortunately this issue has been closed by skipping another test. I've created #247 so they are not forgotten though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants