Browse files

Make sure we kill the server before we leave

A possible fix for #32.

Signed-off-by: Pedro Melo <>
  • Loading branch information...
1 parent 22db3e9 commit afe2ef2e81a442087d16a78c6eea5b0f1cd14e6b @melo melo committed Jan 22, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 t/30-scripts.t
@@ -15,7 +15,10 @@ my $o = Redis->new(server => $srv);
## Make sure SCRIPT commands are available
eval { $o->script_flush };
-plan skip_all => 'This redis-server lacks scripting support' if $@ && $@ =~ /ERR unknown command 'SCRIPT',/;
+if ($@ && $@ =~ /ERR unknown command 'SCRIPT',/) {
+ $c->();
+ plan skip_all => 'This redis-server lacks scripting support';
## Commands related to Lua scripting

4 comments on commit afe2ef2

Ovid commented on afe2ef2 Jan 22, 2013

Actually, this issues happens with many other test scripts, not just this one. I only used that one as a convenient example.

melo commented on afe2ef2 Jan 22, 2013

Hmms... As I said to Karen on RT 82699, I'm having problems reproducing this. For perl to hang, it must be waiting for something but I cannot see what.

A strace of the process would help me a bit more. At least we could see if its spinning or just waiting on a fd, and if it is waiting on a fd, lsof -p PID would give us what it is waiting on.

If it is spinning, check out current master. I pushed ecec0fc (for #31) some minutes ago, it was a spinning problem, and it should be fixed by now.

ref #32

Ovid commented on afe2ef2 Jan 22, 2013

I've sent you a private email with a strace and the lsof information.


melo commented on afe2ef2 Jan 22, 2013

Well... :)

I have a solution for this problem then, I just need to merge your code, #33 ;)

I don't know why, but hangs while waiting for a response to the INFO command I send him to pick up the server version here.

Why redis-server is blocking on a INFO command I have no possible idea, I would like to know, but it would require strace on the redis-server itself... But your read/write timeout code will solve this particular problem.

I'll leave this issue open until I merge your code, and update it afterwards.

Please sign in to comment.