trbs/bucky

Tests fail in master branch

Closed this issue · 5 comments

I opened the dummy PR #44 to trigger the travis-ci tests.

Python 3.4 tests always freezes on scenario 001-test-statsd.test_larger_count and never completes.
All the rest python versions fail in scenarios 002-test-collectd.test_crypto_auth_reload and 004-test-helpers.test_file_monitor, both depending on watchdog module. See https://travis-ci.org/trbs/bucky/builds/33185352

After pinning watchdog to version 0.7.1 (the latest release is 0.8.1), python 3.4 tests still freeze on 001-test-statsd.test_larger_count, but all other versions succeed. See https://travis-ci.org/trbs/bucky/builds/33186621

So we have 2 issues here, one with python 3.4 and the statsd tests, and one with the recent watchdog version.

Also, increasing the timeout from .1 to 1 secs solves the issue for python2.* but not 3.*

trbs commented

Travis works now.

@dimrozakis could you check with my latest changes on your machines ?
These changes do not completely fix whatever is wrong with the tests and python3 but the workaround to run the tests files independently at least makes CI work again.

Yeap, the tests succeed both in travis and in my machines when run separately. Any idea what could be the reason it fails when all test suites are run together?

trbs commented

Some combinations of tests suites work and Some don't. As far as i found it had to do with multiprocessing and/or threading.

For example in my tests the thread inside the statsd process goes into stopped state directly after start() is called and it apparently does not process the line send to it making the queue.get call timeout.

trbs commented

I renamed all the tests so that we can import then normally.

When running them as "normal" python code I see the same problem on python3. This at least rules out nosetests as being the problem :)

The moment I start to do anything with multiprocessing the problem seems to arise.

For example if I replace the test_sigterm_handling test with something that uses multiprocessing the problem occurs, but other non-multiprocessing using code works fine.

def test_sigterm_handing():
   success = multiprocessing.Value('d', -1)