diff options
Diffstat (limited to 'test/test_mogilefs_integration_large_pipe.rb')
-rw-r--r-- | test/test_mogilefs_integration_large_pipe.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_mogilefs_integration_large_pipe.rb b/test/test_mogilefs_integration_large_pipe.rb index afc62e5..afc252e 100644 --- a/test/test_mogilefs_integration_large_pipe.rb +++ b/test/test_mogilefs_integration_large_pipe.rb @@ -39,13 +39,14 @@ class TestMogileFSLargePipe< TestMogIntegration tmp_path = tmp.path File.unlink(tmp_path) x!("mkfifo", tmp_path) - th = Thread.new do + pid = fork do File.open(tmp_path, "wb") do |w| nr.times { w.write(junk) } end end assert_equal(nr * junk.size, @client.store_file("fifo", nil, tmp_path)) - th.join + _, status = Process.waitpid2(pid) + assert status.success?, status.inspect fifo_sha1 = @client.get_file_data("fifo") { |rd| sha1read(rd) } assert_equal sha1, fifo_sha1 end |