From 2ed116f97e604db4fcb602cb2345e2c8f54363f5 Mon Sep 17 00:00:00 2001 From: Wenda Date: Thu, 31 Jan 2019 18:21:49 +0000 Subject: [PATCH 1/3] Increase the watermark polling interval to 10s Signed-off-by: Wenda --- orchagent/portsorch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index ceba79a398..575b5509c6 100644 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -41,8 +41,8 @@ extern BufferOrch *gBufferOrch; #define DEFAULT_VLAN_ID 1 #define PORT_FLEX_STAT_COUNTER_POLL_MSECS "1000" #define QUEUE_FLEX_STAT_COUNTER_POLL_MSECS "10000" -#define QUEUE_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "1000" -#define PG_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "1000" +#define QUEUE_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "10000" +#define PG_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "10000" static map fec_mode_map = From b624e99cb8ed5e200af1c3dfb114b0a292ca6362 Mon Sep 17 00:00:00 2001 From: Wenda Date: Fri, 1 Feb 2019 00:25:32 +0000 Subject: [PATCH 2/3] Update watermark test timing with 10s polling interval Signed-off-by: Wenda --- tests/test_watermark.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_watermark.py b/tests/test_watermark.py index a3dc8ecf0f..fcd77fac0c 100644 --- a/tests/test_watermark.py +++ b/tests/test_watermark.py @@ -22,6 +22,7 @@ class TestWatermark(object): DEFAULT_TELEMETRY_INTERVAL = 120 NEW_INTERVAL = 5 + DEFAULT_POLL_INTERVAL = 10 def enable_unittests(self, dvs, status): db = swsscommon.DBConnector(swsscommon.ASIC_DB, dvs.redis_sock, 0) @@ -57,7 +58,7 @@ def populate_asic_all(self, dvs, val): self.populate_asic(dvs, "SAI_OBJECT_TYPE_QUEUE", SaiWmStats.queue_shared, val) self.populate_asic(dvs, "SAI_OBJECT_TYPE_INGRESS_PRIORITY_GROUP", SaiWmStats.pg_shared, val) self.populate_asic(dvs, "SAI_OBJECT_TYPE_INGRESS_PRIORITY_GROUP", SaiWmStats.pg_headroom, val) - time.sleep(1) + time.sleep(DEFAULT_POLL_INTERVAL) def verify_value(self, dvs, obj_ids, table_name, watermark_name, expected_value): From 8e0a689de0520a02ada0fb825a612c6d3728fa4e Mon Sep 17 00:00:00 2001 From: Wenda Date: Fri, 1 Feb 2019 01:46:21 +0000 Subject: [PATCH 3/3] Correct syntax error Signed-off-by: Wenda --- tests/test_watermark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_watermark.py b/tests/test_watermark.py index fcd77fac0c..80602929c9 100644 --- a/tests/test_watermark.py +++ b/tests/test_watermark.py @@ -58,7 +58,7 @@ def populate_asic_all(self, dvs, val): self.populate_asic(dvs, "SAI_OBJECT_TYPE_QUEUE", SaiWmStats.queue_shared, val) self.populate_asic(dvs, "SAI_OBJECT_TYPE_INGRESS_PRIORITY_GROUP", SaiWmStats.pg_shared, val) self.populate_asic(dvs, "SAI_OBJECT_TYPE_INGRESS_PRIORITY_GROUP", SaiWmStats.pg_headroom, val) - time.sleep(DEFAULT_POLL_INTERVAL) + time.sleep(self.DEFAULT_POLL_INTERVAL) def verify_value(self, dvs, obj_ids, table_name, watermark_name, expected_value):