perl-redis icon indicating copy to clipboard operation
perl-redis copied to clipboard

1.999: test suite is failing in one unit

Open kloczek opened this issue 3 years ago • 5 comments

+ cd Redis-1.999
+ RELEASE_TESTING=1
+ ./Build test
t/00-compile.t ........... ok
t/01-basic.t ............. ok
t/02-responses.t ......... ok
t/03-pubsub.t ............ ok
t/04-pipeline.t .......... 1/?
#   Failed test 'info in pipelined mode'
#   at t/04-pipeline.t line 52.
# Compared $data->[1][0]
#    got : HASH(0x56521fa11568)
# expect : undef
t/04-pipeline.t .......... 7/? # Looks like you failed 1 test of 11.
t/04-pipeline.t .......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/11 subtests
t/05-nonblock.t .......... ok
t/06-on-connect.t ........ ok
t/07-reconnect.t ......... 1/?     # Sleeping 11 seconds, waiting for Redis to timeout...
t/07-reconnect.t ......... 12/?     # waiting for sleep command
t/07-reconnect.t ......... ok
t/08-unix-socket.t ....... ok
t/10-tie-list.t .......... ok
t/11-timeout.t ........... ok
t/20-tie-hash.t .......... ok
t/30-scripts.t ........... ok
t/42-client_cmds.t ....... ok
t/44-no-unicode-bug.t .... ok
t/50-fork_safe.t ......... ok
t/author-distmeta.t ...... skipped: these tests are for testing by the author
t/author-pod-coverage.t .. skipped: these tests are for testing by the author

Test Summary Report
-------------------
t/04-pipeline.t        (Wstat: 256 Tests: 11 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
Files=18, Tests=283, 70 wallclock secs ( 0.19 usr  0.06 sys +  6.77 cusr  1.33 csys =  8.35 CPU)
Result: FAIL
[tkloczko@devel-g2v Redis-1.999]$ perl -t t/04-pipeline.t
Can't locate Redis.pm in @INC (you may need to install the Redis module) (@INC contains: /usr/local/lib64/perl5/5.36 /usr/local/share/perl5/5.36 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at t/04-pipeline.t line 16.
BEGIN failed--compilation aborted at t/04-pipeline.t line 16.
[tkloczko@devel-g2v Redis-1.999]$ perl perl -Mblib t/04-pipeline.t
Can't open perl script "perl": No such file or directory
[tkloczko@devel-g2v Redis-1.999]$ perl -Mblib t/04-pipeline.t
ok 1 - connected to our test redis-server
ok 2 - single-command pipeline
ok 3 - pipeline with embedded error
ok 4 - keys in pipelined mode
not ok 5 - info in pipelined mode
#   Failed test 'info in pipelined mode'
#   at t/04-pipeline.t line 52.
# Compared $data->[1][0]
#    got : HASH(0x555d31c5d0c8)
# expect : undef
ok 6 - pipeline with multi-bulk reply
ok 7 - large pipeline
# Subtest: synchronous request with pending pipeline
    ok 1 - queue a request
    ok 2 - queue another request
    ok 3 - synchronous request has expected return
    ok 4 - synchronous request processes pending ones
    1..4
ok 8 - synchronous request with pending pipeline
# Subtest: transaction with error and pipeline
    ok 1 - multi started
    ok 2 - queued
    ok 3 - queued
    ok 4 - queued
    ok 5 - set
    ok 6 - bad rpush value should be undef
    ok 7 - bad rpush should give an error
    ok 8 - get should work
    1..8
ok 9 - transaction with error and pipeline
# Subtest: transaction with error and no pipeline
    ok 1 - multi
    ok 2 - transactional SET
    ok 3 - transactional bad RPUSH
    ok 4 - transactional GET
    ok 5 - synchronous EXEC dies for intervening error
    1..5
ok 10 - transaction with error and no pipeline
# Subtest: wait_one_response
    ok 1 - after first wait_one_response(), first callback called
    ok 2 - ... but not the second one
    ok 3 - after second wait_one_response(), first callback was not called again
    ok 4 - ... but the second one was called
    ok 5 - after final wait_all_responses(), first callback was called again
    ok 6 - ... the second one was also called
    ok 7 - after final wait_one_response(), first callback was not called again
    ok 8 - ... nor was the second one
    1..8
ok 11 - wait_one_response
1..11
# Looks like you failed 1 test of 11.
[tkloczko@devel-g2v Redis-1.999]$ perl -Mblib t/04-pipeline.t
ok 1 - connected to our test redis-server
ok 2 - single-command pipeline
ok 3 - pipeline with embedded error
ok 4 - keys in pipelined mode
not ok 5 - info in pipelined mode
#   Failed test 'info in pipelined mode'
#   at t/04-pipeline.t line 52.
# Compared $data->[1][0]
#    got : HASH(0x5611d9c9cd58)
# expect : undef
ok 6 - pipeline with multi-bulk reply
ok 7 - large pipeline
# Subtest: synchronous request with pending pipeline
    ok 1 - queue a request
    ok 2 - queue another request
    ok 3 - synchronous request has expected return
    ok 4 - synchronous request processes pending ones
    1..4
ok 8 - synchronous request with pending pipeline
# Subtest: transaction with error and pipeline
    ok 1 - multi started
    ok 2 - queued
    ok 3 - queued
    ok 4 - queued
    ok 5 - set
    ok 6 - bad rpush value should be undef
    ok 7 - bad rpush should give an error
    ok 8 - get should work
    1..8
ok 9 - transaction with error and pipeline
# Subtest: transaction with error and no pipeline
    ok 1 - multi
    ok 2 - transactional SET
    ok 3 - transactional bad RPUSH
    ok 4 - transactional GET
    ok 5 - synchronous EXEC dies for intervening error
    1..5
ok 10 - transaction with error and no pipeline
# Subtest: wait_one_response
    ok 1 - after first wait_one_response(), first callback called
    ok 2 - ... but not the second one
    ok 3 - after second wait_one_response(), first callback was not called again
    ok 4 - ... but the second one was called
    ok 5 - after final wait_all_responses(), first callback was called again
    ok 6 - ... the second one was also called
    ok 7 - after final wait_one_response(), first callback was not called again
    ok 8 - ... nor was the second one
    1..8
ok 11 - wait_one_response
1..11
# Looks like you failed 1 test of 11.

kloczek avatar Aug 03 '22 13:08 kloczek

I have exactly the same problem on a fresh Ubuntu 22.04 (and an older one, but not sure if that was 20.04 or 18.04).

MartijnLievaart avatar Dec 29 '22 11:12 MartijnLievaart

I see this too, when using Redis 7.

The failing test looks like it's deliberately issuing a broken command and expecting to get back an error message. The broken command is INFO with two parameters. The doco for Redis 6 seems to indicate that at most one param is allowed. For Redis 7 multiple params are allowed - see the History section at the bottom of the page - so there's no error.

DrHyde avatar Jan 13 '23 17:01 DrHyde

Ah, looks like it's been fixed (https://github.com/PerlRedis/perl-redis/pull/156) and there's a PR for fixing the fix (https://github.com/PerlRedis/perl-redis/pull/158/files).

DrHyde avatar Jan 13 '23 17:01 DrHyde

If it is already merged is it possible to release new version? 🤔

kloczek avatar Jan 17 '23 01:01 kloczek

it's pushed to CPAN as version 2.000

dams avatar Jan 17 '23 08:01 dams