This commit is contained in:
Patrick J Cherry
2018-02-02 21:34:14 +00:00
parent 1b7b688f7a
commit 9c48da82cc
40 changed files with 666 additions and 858 deletions

View File

@@ -11,10 +11,10 @@ include FlexNBD
addr, port, srv_pid = *ARGV
client = FakeSource.new( addr, port, "Timed out connecting" )
client = FakeSource.new(addr, port, 'Timed out connecting')
client.read_hello
client.write_write_request( 0, 8 )
client.write_data( "12345678" )
client.write_write_request(0, 8)
client.write_data('12345678')
# Use system "kill" rather than Process.kill because Process.kill
# doesn't seem to work
@@ -25,12 +25,11 @@ client.close
system "kill -CONT #{srv_pid}"
sleep(0.25)
begin
client2 = FakeSource.new( addr, port, "Expected timeout" )
fail "Unexpected reconnection"
client2 = FakeSource.new(addr, port, 'Expected timeout')
raise 'Unexpected reconnection'
rescue Timeout::Error
# expected
end