about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-05-29 06:14:15 +0000
committerEric Wong <e@80x24.org>2016-05-29 11:20:56 +0000
commitfa172db40c58ddb3894c5eec968b29df466f6b4c (patch)
tree3f698e6d2f27feb056a6f0b8cb45dade16ab2e4c
parentf57e755430ca14e2b559cbdb41825e87b82f6225 (diff)
downloadcmogstored-fa172db40c58ddb3894c5eec968b29df466f6b4c.tar.gz
It's probably overkill to use 100G of space, even
if its sparse.
-rw-r--r--test/pwrite_wrap.rb15
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" \