circus-tent / circus

A Process & Socket Manager built with zmq
http://circus.readthedocs.org/
Other
1.55k stars 257 forks source link

fix tests on MacOS #1140

Closed ltalirz closed 4 years ago

ltalirz commented 4 years ago

This is just a ticket to track the two tests that are currently failing on MacOS (see CI logs):

FAIL: test_resource_watcher_max_mem (circus.tests.test_plugin_resource_watcher.TestResourceWatcher)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/circus/circus/.tox/py38/lib/python3.8/site-packages/tornado/testing.py", line 98, in __call__
    result = self.orig_method(*args, **kwargs)
  File "/Users/runner/work/circus/circus/.tox/py38/lib/python3.8/site-packages/tornado/testing.py", line 594, in post_coroutine
    return self.io_loop.run_sync(
  File "/Users/runner/work/circus/circus/.tox/py38/lib/python3.8/site-packages/tornado/ioloop.py", line 532, in run_sync
    return future_cell[0].result()
  File "/Users/runner/work/circus/circus/.tox/py38/lib/python3.8/site-packages/tornado/gen.py", line 748, in run
    yielded = self.gen.send(value)
  File "/Users/runner/work/circus/circus/circus/tests/test_plugin_resource_watcher.py", line 73, in test_resource_watcher_max_mem
    self._check_statsd(statsd_increments,
  File "/Users/runner/work/circus/circus/circus/tests/test_plugin_resource_watcher.py", line 43, in _check_statsd
    self.assertTrue(len(res) > 0)
AssertionError: False is not true

and

FAIL: test_resource_watcher_max_mem_abs (circus.tests.test_plugin_resource_watcher.TestResourceWatcher)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/circus/circus/.tox/py38/lib/python3.8/site-packages/tornado/testing.py", line 98, in __call__
    result = self.orig_method(*args, **kwargs)
  File "/Users/runner/work/circus/circus/.tox/py38/lib/python3.8/site-packages/tornado/testing.py", line 594, in post_coroutine
    return self.io_loop.run_sync(
  File "/Users/runner/work/circus/circus/.tox/py38/lib/python3.8/site-packages/tornado/ioloop.py", line 532, in run_sync
    return future_cell[0].result()
  File "/Users/runner/work/circus/circus/.tox/py38/lib/python3.8/site-packages/tornado/gen.py", line 748, in run
    yielded = self.gen.send(value)
  File "/Users/runner/work/circus/circus/circus/tests/test_plugin_resource_watcher.py", line 89, in test_resource_watcher_max_mem_abs
    self._check_statsd(statsd_increments,
  File "/Users/runner/work/circus/circus/circus/tests/test_plugin_resource_watcher.py", line 43, in _check_statsd
    self.assertTrue(len(res) > 0)
AssertionError: False is not true

It seems like on MacOS the statsd_increments https://github.com/circus-tent/circus/blob/b987b5cd9acd2e80ee654a1cd39294ea27729be0/circus/tests/test_plugin_resource_watcher.py#L69-L72 are empty.

Would be great if someone familiar with the topic could have a quick look into this.