Skip to content

bug in the testsuite: doesn't accept freshly started tcp redis server as ready #3

@az143

Description

@az143

in release 0.48 (which isn't present as tag or release on github, btw), and with a redis server version 6.0.16 the testsuite doesn't run t/09-conn-errors.t properly: after test 14 there's a very long delay (around a minute), and then the remaining tests are all skipped: "redis-server is required for this test".

the root cause is that t/tlib/Test/RedisRunner.pm misidentifies its newly started redis-server (with port) as not ready, waits a while and then kills it (and the rest of the testsuite unfortunately swallows the diagnostic output from redisrunner, so it's a bit hard to find out what happened).

redisrunner looks for this:
if ( $log =~ /The server is now ready to accept connections/

whereas redis 6 logs this if (and only if) started with a tcp port:

26223:C 27 Apr 2023 10:43:46.935 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=26223, just started
....
26223:M 27 Apr 2023 10:43:46.936 * Running mode=standalone, port=38217.
26223:M 27 Apr 2023 10:43:46.936 # Server initialized
...
26223:M 27 Apr 2023 10:43:46.936 * Ready to accept connections

the interesting (well, ugly) aspect is that redis logs a different message if you start it with only a socket:

17369:M 26 Apr 2023 10:35:58.265 * The server is now ready to accept connections at /var/run/redis/redis-server.sock

solution: i'd suggest changing redisrunner to look for /[rR]eady to accept connections/ which covers both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions