Test-More / Test2-Harness

Alternative to Test::Harness
Other
23 stars 26 forks source link

yath replay foo.jsonl.bz2 fails #144

Closed toddr closed 4 years ago

toddr commented 4 years ago

it looks like something changed and replay isn't detecting that it needs to decompress the bz2 file on the fly when it replays it.

$>yath replay -v pr19259.jsonl.bz2
pr19259.jsonl.bz2 (0 -> 46): JSON decode error: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "BZh91AY&SY\x{3}\x{fffd}...") at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Test2/Harness/Util/JSON.pm line 68, <$fh> line 1.
 at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Test2/Harness/Util/File/JSONL.pm line 13, <$fh> line 1.
    Test2::Harness::Util::File::JSONL::decode(Test2::Harness::Util::File::JSONL=HASH(0x2616a20), "BZh91AY&SY\x{3}\x{fb}\x{b5}\x{e1}\x{6}\x{cc}\x{9}\x{df}\x{80}\@\x{10}2\x{7}\x{ff}\x{f2}\x{7f}\x{ff}\x{ff}\x{fa}\x{bf}\x{ff}\x{ff}\x{fa}a\"?<\x{fa}}w5t\x{b}\x{8e}8\x{a}") called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Test2/Harness/Util/File.pm line 101
    eval {...} called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Test2/Harness/Util/File.pm line 101
    Test2::Harness::Util::File::read_line(Test2::Harness::Util::File::JSONL=HASH(0x2616a20), "from", 0) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Test2/Harness/Util/File/Stream.pm line 42
    Test2::Harness::Util::File::Stream::poll_with_index(Test2::Harness::Util::File::JSONL=HASH(0x2616a20), "max", 1000) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Test2/Harness/Util/File/Stream.pm line 61
    Test2::Harness::Util::File::Stream::poll(Test2::Harness::Util::File::JSONL=HASH(0x2616a20), "max", 1000) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/App/Yath/Command/replay.pm line 64
    App::Yath::Command::replay::run(App::Yath::Command::replay=HASH(0x24e2d68)) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/App/Yath.pm line 73
    App::Yath::run_command(App::Yath=HASH(0x167daa8), App::Yath::Command::replay=HASH(0x24e2d68)) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/App/Yath.pm line 59
    App::Yath::__ANON__() called at /usr/local/cpanel/3rdparty/bin/yath line 224

=======
BZh91AY&SY????  ߀@2?????????a"?<?}w5t
                                     ?8

=======
 at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Test2/Harness/Util/File.pm line 101, <$fh> line 1.
    Test2::Harness::Util::File::read_line(Test2::Harness::Util::File::JSONL=HASH(0x2616a20), "from", 0) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Test2/Harness/Util/File/Stream.pm line 42
    Test2::Harness::Util::File::Stream::poll_with_index(Test2::Harness::Util::File::JSONL=HASH(0x2616a20), "max", 1000) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Test2/Harness/Util/File/Stream.pm line 61
    Test2::Harness::Util::File::Stream::poll(Test2::Harness::Util::File::JSONL=HASH(0x2616a20), "max", 1000) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/App/Yath/Command/replay.pm line 64
    App::Yath::Command::replay::run(App::Yath::Command::replay=HASH(0x24e2d68)) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/App/Yath.pm line 73
    App::Yath::run_command(App::Yath=HASH(0x167daa8), App::Yath::Command::replay=HASH(0x24e2d68)) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/App/Yath.pm line 59
    App::Yath::__ANON__() called at /usr/local/cpanel/3rdparty/bin/yath line 224

But then decompress it and work on the uncompressed one...

200207.213000 root@toddr.dev.cpanel.net (/root)
$>bunzip2 pr19259.jsonl.bz2
yath replay -v pr19259.jsonl200207.213016 root@toddr.dev.cpanel.net (/root)
$>yath replay -v pr19259.jsonl |head -3
[  PLAN  ]  job    2    Expected assertions: 124
(  NOTE  )  job    2    running tests in parallel for 124 scripts
[  PLAN  ]  job    7    Expected assertions: 26