Simplify wrong_failure_counter_test to only test the changed code
authorTrond Norbye <trond.norbye@sun.com>
Mon, 12 Oct 2009 21:31:25 +0000 (23:31 +0200)
committerTrond Norbye <trond.norbye@sun.com>
Mon, 12 Oct 2009 21:31:25 +0000 (23:31 +0200)
commitdd50ba14e3e23af4660ce5894863d8fabe95afba
tree0a64e235463433676c22b7e433dd076370e2bcef
parentb463bc16162d38d49663e7b77b9a3aaa326c2bf7
Simplify wrong_failure_counter_test to only test the changed code

The original version of wrong_failure_counter_test didn't work on gaz because
the server_failure_counter was already set when entering the test case. The
purpose of the test was to ensure that memcached_quit didn't increment the
server_failure_counter, and to do so it tried to set different behavior flags.
Some of these would cause a really low retry timeout, which in turn could
cause "problems" on a slow server.

There was another problem in memcached_quit_server on some platforms caused
by the draining of the input pipe from from the server. This function could
get a read error, resulting in memcached_quit_server being called
recursively but this time signaling an IO error causing the counter to be
increased. We should ignore these errors, because they are triggered
while we are draining the stream from the server.
libmemcached/memcached_quit.c
tests/function.c