p5-RedisDB / RedisDB

Perl extension to access Redis
22 stars 11 forks source link

t/network.t fails on perl 5.17.x #12

Closed chorny closed 11 years ago

chorny commented 11 years ago

version 2.13_04

Linux, perl 5.17.11:

Failed test 'reconnected and set the key'

#   at t/network.t line 151.
# An error occurred while using eq:
# ------------------------------------
# Operation "eq": no method found,
#   left argument in overloaded package RedisDB::Error::DISCONNECTED,
#   right argument has no overloaded magic at (eval in cmp_ok) t/network.t line 151.
# 
# ------------------------------------
#          got: 'Connection error: Соединение сброшено другой стороной'
#     expected: 'OK'
# Looks like you failed 1 test of 4.

Failed test 'Restore connection without raise_error'

at t/network.t line 152.

Looks like you failed 1 test of 5.

Died on timeout. at t/network.t line 108. t/network.t ................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/5 subtests

Windows, perl 5.17.10:

Failed test 'reconnected and set the key'

#   at t/network.t line 151.
# An error occurred while using eq:
# ------------------------------------
# Operation "eq": no method found,
#   left argument in overloaded package RedisDB::Error::DISCONNECTED,
#   right argument has no overloaded magic at (eval in cmp_ok) t/network.t line 151.
#
# ------------------------------------
#          got: 'Connection error: Удаленный хост принудительно разорвал существующее подключение.'
#     expected: 'OK'
# Looks like you failed 1 test of 4.

Failed test 'Restore connection without raise_error'

at t/network.t line 152.

Looks like you failed 1 test of 5.

(hangs)

trinitum commented 11 years ago

Thank you for your report. I don't think that perl version is relevant as I can't reproduce it myself with 5.17.11, and there are some PASSes from cpan-testers, like e.g. http://www.cpantesters.org/cpan/report/43151e96-b57c-11e2-9652-821cc1508286. But after looking onto network.t I do see a possibility for a race condition, if after fork closed client socket parent process will try to reconnect before fork closed listening socket, you should get the error you've got. I think that 5173132 should fix the problem, but as I couldn't reproduce it in a first place, I can't be sure. Therefore I'll be grateful if you could check if RedisDB-2.13_06 passes the test on your test boxes.

chorny commented 11 years ago

Yes, tests pass without problems.

trinitum commented 11 years ago

Thank you