Check that a mirror write returning an error will cause a reconnect and retry

This commit is contained in:
Alex Young
2012-07-02 15:04:45 +01:00
parent 99f8c24b01
commit ea4642a878
10 changed files with 192 additions and 88 deletions

View File

@@ -3,11 +3,11 @@
# Accept a connection, then immediately close it. This simulates an ACL rejection.
require 'flexnbd/fake_dest'
include FlexNBD::FakeDest
include FlexNBD
serve_sock = serve( *ARGV )
accept( serve_sock, "Timed out waiting for a connection" ).close
server = FakeDest.new( *ARGV )
server.accept.close
serve_sock.close
server.close
exit(0)