test_watcher: fix incorrect request/date comparison
authorEric Wong <normalperson@yhbt.net>
Mon, 18 Jun 2012 20:18:28 +0000 (18 13:18 -0700)
committerEric Wong <normalperson@yhbt.net>
Mon, 18 Jun 2012 20:24:30 +0000 (18 13:24 -0700)
It makes no sense to compare peak times of different queues
(active vs queued) against each other.

test/test_watcher.rb

index 056a3bf..5e45dcd 100644 (file)
@@ -156,6 +156,7 @@ class TestWatcher < Test::Unit::TestCase
     @ios << @srv.accept
     assert_raises(Errno::EAGAIN) { @srv.accept_nonblock }
     sleep 0.1
+    env = @req.class.env_for "/queued/#@addr.txt"
     status, headers, body = @app.call(env.dup)
     assert headers["X-Last-Peak-At"], headers.inspect
     assert_nothing_raised { Time.parse(headers["X-Last-Peak-At"]) }