Yelp / Testify

A more pythonic testing framework.
Other
306 stars 67 forks source link

Fix race condition in backoff caused by attribute access. #252

Closed asottile closed 10 years ago

asottile commented 10 years ago

I have zero reasons that this fixes things, but it seems to make the test not flaky any more :/

ymilki commented 10 years ago

Interesting. We should probably look into this a bit more.

asottile commented 10 years ago

Try this before and after: yes | xargs --replace testify test.plugins.sql_reporter_test

ymilki commented 10 years ago

The flake that occurs is:

fail: test.plugins.sql_reporter_test RetryTestCase.test_can_fail
Traceback (most recent call last):
  File "./test/plugins/sql_reporter_test.py", line 271, in test_can_fail
    self.reporter._connect()
  File "/usr/lib/python2.6/contextlib.py", line 23, in __exit__
    self.gen.next()
AssertionError: No exception was raised (expected <class 'sqlalchemy.exc.OperationalError'>)

FAIL in 0.16s
asottile commented 10 years ago

anyways I'll close this and open an issue, because I don't think I've solved this