Permalink
Browse files

add more wiggle room to harvest slowest, since it still fails intermi…

…ttently.
  • Loading branch information...
1 parent 3246e82 commit 7c741296fb9210c389275b5ac4ec2ad3026338c6 @jaggederest jaggederest committed May 9, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/new_relic/agent/transaction_sampler_test.rb
@@ -740,7 +740,7 @@ def test_harvest_slowest
run_sample_trace
slowest = @sampler.harvest(nil, 0)[0]
- assert((slowest.duration >= 0.1), "expected sample duration >= 0.1, but was: #{slowest.duration.inspect}")
+ assert((slowest.duration >= 0.09), "expected sample duration >= 0.09, but was: #{slowest.duration.inspect}")
# this assert is here to make sure the test remains valid
assert((slowest.duration <= 0.15), "expected sample duration <= 0.15, but was: #{slowest.duration.inspect}")
@@ -749,7 +749,7 @@ def test_harvest_slowest
not_as_slow = @sampler.harvest(slowest, 0)[0]
assert((not_as_slow == slowest), "Should re-harvest the same transaction since it should be slower than the new transaction - expected #{slowest.inspect} but got #{not_as_slow.inspect}")
- run_sample_trace { sleep 0.15 }
+ run_sample_trace { sleep 0.16 }
new_slowest = @sampler.harvest(slowest, 0)[0]
assert((new_slowest != slowest), "Should not harvest the same trace since the new one should be slower")
assert((new_slowest.duration >= 0.15), "Slowest duration must be >= 0.15, but was: #{new_slowest.duration.inspect}")

0 comments on commit 7c74129

Please sign in to comment.