Performance Monitor tests fail on OSX

Bug #1177403 reported by Lars Butler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Engine
Fix Released
High
Michele Simionato

Bug Description

These tests will pass on Linux, but fail on OSX:

======================================================================
FAIL: test_engine_performance_monitor (tests.performance_monitor_test.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/larsbutler/proj/oq-engine/tests/performance_monitor_test.py", line 40, in test_engine_performance_monitor
    self._check_result(pmon, nproc=2)
  File "/Users/larsbutler/proj/oq-engine/tests/performance_monitor_test.py", line 22, in _check_result
    self.assertEqual(nproc, len(pmon.mem))
AssertionError: 2 != 1

======================================================================
FAIL: test_engine_performance_monitor_no_task (tests.performance_monitor_test.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/larsbutler/proj/oq-engine/tests/performance_monitor_test.py", line 51, in test_engine_performance_monitor_no_task
    self._check_result(pmon, nproc=2)
  File "/Users/larsbutler/proj/oq-engine/tests/performance_monitor_test.py", line 22, in _check_result
    self.assertEqual(nproc, len(pmon.mem))
AssertionError: 2 != 1

The problem is that, by default, a non-superuser does not have permission to read the proc file for postgres, and thus, the performance monitor doesn't track both expected processes (1. the python process and 2. the postgres process).

It would be nice if we can get this to work on OSX as well while still maintaining good tests.

Revision history for this message
Michele Simionato (michele-simionato) wrote :
Changed in oq-engine:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Michele Simionato (michele-simionato)
milestone: none → 1.0.0
Changed in oq-engine:
status: Confirmed → Fix Committed
Changed in oq-engine:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.