diff options
Diffstat (limited to 'test/pwrite_wrap.rb')
-rw-r--r-- | test/pwrite_wrap.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/pwrite_wrap.rb b/test/pwrite_wrap.rb index e7356c6..744f2be 100644 --- a/test/pwrite_wrap.rb +++ b/test/pwrite_wrap.rb @@ -72,19 +72,20 @@ class TestPwriteWrap < Test::Unit::TestCase end def __test_pwrite_slow(chunked) - Process.kill(:VTALRM, @pid) - t_yield - Process.kill(:TTIN, @pid) - wait_for(5, "enable slow knob") do - File.readlines(@err.path).grep(/knob set: slow/)[0] && - File.readlines(@err.path).grep(/flag set: slow/)[0] + Process.kill(:VTALRM, @pid) # move knob to PWRITE_WRAP_SLOW + wait_for(5, 'move to slow knob', 0.01) do + File.readlines(@err.path).grep(/knob set: slow/)[0] + end + Process.kill(:TTIN, @pid) # turn on the switch for where the knob is + wait_for(5, 'enable slow knob', 0.01) do + File.readlines(@err.path).grep(/flag set: slow/)[0] end client_2 = get_client thr = Thread.new do begin - size = 1024 * 1024 * 1024 * 10 + size = 100 * 1024 * 1024 if chunked @client.write("PUT /dev666/foo.fid HTTP/1.1\r\n" \ "Host: example.com\r\n" \ |