Switch from expecting a reconnection to *not* doing do

If we're aborting mirror operations early, a couple of specs need to
change sense.
This commit is contained in:
Alex Young
2012-07-15 22:07:00 +01:00
parent 10625e402b
commit f5850e5aaf
2 changed files with 19 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
# Accept a connection, then immediately close it. This simulates an ACL rejection.
# We do not expect a reconnection.
require 'flexnbd/fake_dest'
include FlexNBD
@@ -9,6 +10,15 @@ addr, port = *ARGV
server = FakeDest.new( addr, port )
server.accept.close
begin
server.accept
fail "Unexpected reconnection"
rescue Timeout::Error
# expected
end
server.close
exit(0)