From 73b620ca942bf42613de384981ce5c326265fb85 Mon Sep 17 00:00:00 2001 From: Wenda Ni Date: Fri, 1 Feb 2019 17:59:32 -0800 Subject: [PATCH] Increase the watermark polling interval to 10s (#777) * Increase the watermark polling interval to 10s Signed-off-by: Wenda * Update watermark test timing with 10s polling interval Signed-off-by: Wenda --- orchagent/portsorch.cpp | 4 ++-- tests/test_watermark.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index ceba79a3987d..575b5509c6b3 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 = diff --git a/tests/test_watermark.py b/tests/test_watermark.py index a3dc8ecf0fc2..80602929c9a9 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(self.DEFAULT_POLL_INTERVAL) def verify_value(self, dvs, obj_ids, table_name, watermark_name, expected_value):