summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-05-22 01:59:37 -0700
committerEric Wong <normalperson@yhbt.net>2009-05-22 01:59:37 -0700
commit6843f3424727bd5e7ac46f7f663f0764a249daa3 (patch)
tree5bebdb683ddba55d64c444e8bdb978e76ad39949
parent64166e69ff4991f95192f16cb1d8cb8807fab21a (diff)
Newer versions of Unicorn do not include a #reset method
-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