JeetShetty / GreenPiThumb

https://mtlynch.io/greenpithumb/
Apache License 2.0
82 stars 12 forks source link

Race condition in poller tests #105

Closed mtlynch closed 7 years ago

mtlynch commented 7 years ago

I'm seeing occasional failures in Travis:

======================================================================
ERROR: test_ambient_light_poller (tests.test_poller.SimplePollerClassesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/JeetShetty/GreenPiThumb/tests/test_poller.py", line 94, in test_ambient_light_poller
    self.record_queue.get(block=True, timeout=TEST_TIMEOUT_SECONDS))
  File "/opt/python/2.7.9/lib/python2.7/Queue.py", line 176, in get
    raise Empty
Empty

----------------------------------------------------------------------
Ran 79 tests in 1.596s

FAILED (errors=1)

Looks like there's a timing issue that causes the tests to sometimes fail.

mtlynch commented 7 years ago

I think #136 fixed this