Update pinger timeout in test_pinger_timeout_config and test_global_pinger_memo

Review Request #3292 - Created Jan. 4, 2016 and submitted

Information
Tansy Arron-Walker
pants
2765
Reviewers
pants-reviews
jsirois, patricklaw, peiyu, stuhood, zundel

Update pinger timeout in test_pinger_timeout_config and test_global_pinger_memo.

Remove get_delayed_handler() as it had been moved to delay_server.py previously.

Add assertion message.

Peiyu's results showed the CI can slow timeout by at least .02, as shown here, where timeout was set to .04, but failed to time out and returned a time of .058:

E     AssertionError: 0.05868887901306152 != 999999

I set up the variables such that they have equal spacing with each other and experimented with different values. with a resolution of .01 the test ran in 3 seconds:

============== test session starts ===============
                     platform linux2 -- Python 2.7.6 -- py-1.4.30 -- pytest-2.6.4
                     plugins: cov, timeout
                     collected 3 items 

                     tests/python/pants_test/cache/test_pinger.py ...

                     ============ 3 passed in 3.08 seconds ============

Changing the resolution to .1 resulted in a test that ran only 1 second slower:

 ============== test session starts ===============
                     platform linux2 -- Python 2.7.6 -- py-1.4.30 -- pytest-2.6.4
                     plugins: cov, timeout
                     collected 3 items 

                     tests/python/pants_test/cache/test_pinger.py ...

                     ============ 3 passed in 4.05 seconds ============

I think a resolution of .1 should be sufficient that a slow machine won't fail the test. If not, it's now really easy to adjust.

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

Peiyu Wang
Tansy Arron-Walker
Tansy Arron-Walker
Tansy Arron-Walker
Peiyu Wang
Tansy Arron-Walker
Tansy Arron-Walker
Tansy Arron-Walker
Tansy Arron-Walker
Patrick Lawson
Eric Ayers
Tansy Arron-Walker
Review request changed

Status: Closed (submitted)

Change Summary:

Merged at dcfd15c8d86092cdd8dedb1458fcc472cc4054b1

Loading...