Browse Source

[2225_statistics] should not do this test unless there is no timer parameter(time_to_xxx) in statistics spec

Naoki Kambe 12 years ago
parent
commit
d834a1a1b9
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/lib/python/isc/statistics/tests/counter_test.py

+ 7 - 0
src/lib/python/isc/statistics/tests/counter_test.py

@@ -264,6 +264,13 @@ class BaseTestCounter():
         self.check_dump_statistics()
         self.check_dump_statistics()
 
 
     def test_perzone_timers(self):
     def test_perzone_timers(self):
+        # should not do this test unless there is no timer
+        # parameter(time_to_xxx) in statistics spec
+        has_timer = False
+        for counter_name in self._zones_item_list:
+            if counter_name.find('time_to_') == 0:
+                has_timer = True
+        if not has_timer: return
         # for timer counters
         # for timer counters
         for counter_name in self._zones_item_list:
         for counter_name in self._zones_item_list:
             if counter_name.find('time_to_') == -1:
             if counter_name.find('time_to_') == -1: