summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-05-22 02:00:38 -0700
committerEric Wong <normalperson@yhbt.net>2009-05-22 02:00:38 -0700
commitb9bd02b4808dd1e9f0d6c3e6e29a6f961a53d0bb (patch)
treec8734eb90b7115c2fbf4c7f32b0e2e1561bac6a4
parentfefe604320ac1384bd74fcb720e2c9d721f48939 (diff)
parent6843f3424727bd5e7ac46f7f663f0764a249daa3 (diff)
* benchmark:
  Define HttpRequest#reset if missing
-rw-r--r--test/benchmark/big_request.rb5
-rw-r--r--test/benchmark/request.rb6
2 files changed, 11 insertions, 0 deletions
diff --git a/test/benchmark/big_request.rb b/test/benchmark/big_request.rb
index ee42d41..a250c62 100644
--- a/test/benchmark/big_request.rb
+++ b/test/benchmark/big_request.rb
@@ -26,6 +26,11 @@ big.fsync
 
 include Unicorn
 request = HttpRequest.new(Logger.new($stderr))
+unless request.respond_to?(:reset)
+  def request.reset
+    # no-op
+  end
+end
 
 Benchmark.bmbm do |x|
   x.report("big") do
diff --git a/test/benchmark/request.rb b/test/benchmark/request.rb
index 1b2d280..fc7822c 100644
--- a/test/benchmark/request.rb
+++ b/test/benchmark/request.rb
@@ -34,6 +34,12 @@ medium = TestClient.new([
 
 include Unicorn
 request = HttpRequest.new(Logger.new($stderr))
+unless request.respond_to?(:reset)
+  def request.reset
+    # no-op
+  end
+end
+
 Benchmark.bmbm do |x|
   x.report("small") do
     for i in 1..nr