diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-04-01 21:46:05 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-04-01 21:46:05 -0700 |
commit | eb34caa3f4b8cedddb14b9e4e0415e2258802134 (patch) | |
tree | 9f1864315ca9fee54549a50ce88e528ced43b367 /test | |
parent | a139c4c8e3555bc30b72fe05e6009da5cc37c280 (diff) | |
download | unicorn-eb34caa3f4b8cedddb14b9e4e0415e2258802134.tar.gz |
We need to ensure the next request has started processing before we can guarantee a temp file has been unlinked.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/test_upload.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/test_upload.rb b/test/unit/test_upload.rb index 8246f65..58058f1 100644 --- a/test/unit/test_upload.rb +++ b/test/unit/test_upload.rb @@ -74,6 +74,12 @@ class UploadTest < Test::Unit::TestCase sock.close assert path != path2 + # make sure the next request comes in so the unlink got processed + sock = TCPSocket.new(@addr, @port) + sock.syswrite("GET ?lasdf\r\n\r\n\r\n\r\n") + sock.sysread(4096) rescue nil + sock.close + assert ! File.exist?(path) end |