Skip to content

Commit

Permalink
fix failure in test_global_pinger_memo
Browse files Browse the repository at this point in the history
Testing Done:
test_global_pinger_memo tries to confirm that pinger times out when the cache takes to long to respond. When the timeout value and the time the cache takes to respond are too close, the test fails.

I increased difference between the cache response time and the timeout value by .01 seconds.

CI is running: https://travis-ci.org/pantsbuild/pants/builds/86543563

Reviewed at https://rbcommons.com/s/twitter/r/3007/
  • Loading branch information
TansyArron authored and jsirois committed Oct 22, 2015
1 parent 285b791 commit 03aebd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/python/pants_test/cache/test_pinger.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_pinger_timeout_config(self):
self.assertEqual(ping_results[self.slow_netloc], Pinger.UNREACHABLE)

def test_global_pinger_memo(self):
fast_pinger = Pinger(timeout=self.slow_seconds, tries=2)
fast_pinger = Pinger(timeout=self.slow_seconds - .01, tries=2)
slow_pinger = Pinger(timeout=self.timeout_seconds, tries=2)
self.assertEqual(fast_pinger.pings([self.slow_netloc])[0][1], Pinger.UNREACHABLE)
self.assertNotEqual(slow_pinger.pings([self.slow_netloc])[0][1], Pinger.UNREACHABLE)
Expand Down

0 comments on commit 03aebd7

Please sign in to comment.