about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-10-22 07:44:33 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-22 07:44:33 +0000
commit927b4e7a23cdf582eac9d9bf87a3403c647ad01b (patch)
treef789f115f02f0f648704c8d6e99d026d2d533b60 /test
parente50fd7f05624f293a2b5c776a0873f6d81185096 (diff)
downloadyahns-927b4e7a23cdf582eac9d9bf87a3403c647ad01b.tar.gz
We know Linux will try to do this, but cannot be completely
successful in all cases.
Diffstat (limited to 'test')
-rw-r--r--test/test_server.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/test/test_server.rb b/test/test_server.rb
index 22cd23f..00e8a0a 100644
--- a/test/test_server.rb
+++ b/test/test_server.rb
@@ -288,37 +288,6 @@ class TestServer < Testcase
     end
   end
 
-  # Linux blocking accept() has fair behavior between multiple tasks
-  def test_mp_balance
-    skip("this fails occasionally on Linux, still...")
-    skip("linux-only test") unless RUBY_PLATFORM =~ /linux/
-    pid, host, port = new_mp_server(2)
-    seen = {}
-
-    # wait for both processes to spin up
-    Timeout.timeout(10) do
-      run_client(host, port) { |res| seen[res.body] = 1 } until seen.size == 2
-    end
-
-    prev = nil
-    req = Net::HTTP::Get.new("/")
-    # we should bounce new connections between 2 processes
-    4.times do
-      Net::HTTP.start(host, port) do |http|
-        res = http.request(req)
-        assert_equal 200, res.code.to_i
-        assert_equal "keep-alive", res["Connection"]
-        refute_equal prev, res.body, "same PID accepted twice"
-        prev = res.body.dup
-        seen[prev] += 1
-        666.times { Thread.pass } # have the other acceptor to wake up
-      end
-    end
-    assert_equal 2, seen.size
-  ensure
-    quit_wait(pid)
-  end
-
   def test_mp_worker_die
     pid, host, port = new_mp_server
     wpid1 = wpid2 = nil