test_mogilefs: improve test completeness/docs
commitc594b27a194c301519141c8b9e0b88a1df06682a
authorEric Wong <normalperson@yhbt.net>
Wed, 1 Aug 2012 20:39:11 +0000 (1 13:39 -0700)
committerEric Wong <normalperson@yhbt.net>
Thu, 2 Aug 2012 00:14:03 +0000 (1 17:14 -0700)
tree9b2b703e9330b4f782371c352df477b5b7887bf0
parent53e87bef5bfebe76a8724375902b7c1cfe1636d4
test_mogilefs: improve test completeness/docs

This test needs to keep the socket alive on the server to ensure
the client can drop the connection.

We also need to ensure the test fails if the following change is
made:

  --- a/lib/mogilefs/backend.rb
  +++ b/lib/mogilefs/backend.rb
  @@ -255,7 +255,7 @@ def do_request(cmd, args, idempotent = false)
           end
           shutdown_unlocked(true)
         rescue MogileFS::UnreadableSocketError, MogileFS::Timeout
  -        shutdown_unlocked(true)
  +        # shutdown_unlocked(true)
         rescue
           # we DO NOT want the response we timed out waiting for, to crop up later
           # on, on the same socket, intersperesed with a subsequent request!  we

Thanks to David Rasch for inspiring this change.
test/test_mogilefs.rb