Browse files

Fix sampling tests

  • Loading branch information...
1 parent 751331e commit ddd173a4d1881ccda27b3938c1da1246c30d4f4e @jstorimer jstorimer committed Sep 4, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/statsd-instrument_test.rb
View
6 test/statsd-instrument_test.rb
@@ -161,15 +161,15 @@ def test_instrumenting_class_method
def test_count_with_sampling
StatsD.unstub(:increment)
- StatsD.stubs(:rand).returns(0.6)
+ StatsD.stubs(:rand).returns(0.1)
StatsD.logger.expects(:info).never
- StatsD.increment('sampling.foo.bar', 1, 0.1)
+ StatsD.increment('sampling.foo.bar', 1, 0.6)
end
def test_count_with_successful_sample
StatsD.unstub(:increment)
- StatsD.stubs(:rand).returns(0.01)
+ StatsD.stubs(:rand).returns(0.2)
StatsD.logger.expects(:info).once.with do |string|
string.include?('@0.1')
end

0 comments on commit ddd173a

Please sign in to comment.