From fa172db40c58ddb3894c5eec968b29df466f6b4c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 29 May 2016 06:14:15 +0000 Subject: test/pwrite_wrap: reduce space overhead required It's probably overkill to use 100G of space, even if its sparse. --- test/pwrite_wrap.rb | 15 ++++++++------- 1 file 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" \ -- cgit v1.2.3-24-ge0c7