[tor-commits] [nyx/master] Header panel testing failure due to system calls

atagar at torproject.org atagar at torproject.org
Sun Jun 26 00:48:01 UTC 2016


commit ede4af404c14e7297e43845714e1baf1f5d900e8
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun May 29 08:36:44 2016 -0700

    Header panel testing failure due to system calls
    
    System calls by our tests caused our nyx cpu time assertion to fail...
    
      ======================================================================
      FAIL: test_sample (panel.header.TestHeader)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/usr/local/lib/python2.7/dist-packages/mock.py", line 1201, in patched
          return func(*args, **keywargs)
        File "/home/atagar/Desktop/nyx/test/panel/header.py", line 151, in test_sample
          self.assertEqual(0.11, vals.nyx_total_cpu_time)
      AssertionError: 0.11 != 1.6735180473327638
    
      ----------------------------------------------------------------------
---
 test/panel/header.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/panel/header.py b/test/panel/header.py
index 62d54af..e8502d9 100644
--- a/test/panel/header.py
+++ b/test/panel/header.py
@@ -123,6 +123,7 @@ class TestHeader(unittest.TestCase):
     resources.memory_percent = .125
 
     resource_tracker_mock().get_value.return_value = resources
+    stem.util.system.SYSTEM_CALL_TIME = 0.0
 
     vals = nyx.panel.header.Sampling.create()
 





More information about the tor-commits mailing list