summaryrefslogtreecommitdiffstats
path: root/test/test_stats_client.py
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-05-16 15:01:34 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-05-22 09:43:49 +0000
commit233e4681830bc2a9cd40deb4b5909b4e310d1a2a (patch)
tree495c36ffbafdfaf8c85672024e2162ea8ee923ac /test/test_stats_client.py
parenta29d18ae6bb7cda3923693a052c3b9208588be8e (diff)
stats: support multiple works for error counters
The current code only allowed access to the main thread error counters. That is not so useful for a multi worker instance. No return a vector indexed by thread of counter_t values. Type: fix Change-Id: Ie322c8889c0c8175e1116e71de04a2cf453b9ed7 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test/test_stats_client.py')
-rw-r--r--test/test_stats_client.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_stats_client.py b/test/test_stats_client.py
index 87c9efd4f1c..a0504fc45ab 100644
--- a/test/test_stats_client.py
+++ b/test/test_stats_client.py
@@ -19,6 +19,12 @@ class StatsClientTestCase(VppTestCase):
def tearDownClass(cls):
super(StatsClientTestCase, cls).tearDownClass()
+ def test_set_errors(self):
+ """Test set errors"""
+ self.assertEqual(self.statistics.set_errors(), {})
+ self.assertEqual(self.statistics.get_counter('/err/ethernet-input/no'),
+ [0])
+
def test_client_fd_leak(self):
"""Test file descriptor count - VPP-1486"""