Skip to content

Commit 73b620c

Browse files
wendanilguohan
authored andcommitted
Increase the watermark polling interval to 10s (sonic-net#777)
* Increase the watermark polling interval to 10s Signed-off-by: Wenda <wenni@microsoft.com> * Update watermark test timing with 10s polling interval Signed-off-by: Wenda <wenni@microsoft.com>
1 parent a2b987b commit 73b620c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

orchagent/portsorch.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ extern BufferOrch *gBufferOrch;
4141
#define DEFAULT_VLAN_ID 1
4242
#define PORT_FLEX_STAT_COUNTER_POLL_MSECS "1000"
4343
#define QUEUE_FLEX_STAT_COUNTER_POLL_MSECS "10000"
44-
#define QUEUE_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "1000"
45-
#define PG_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "1000"
44+
#define QUEUE_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "10000"
45+
#define PG_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "10000"
4646

4747

4848
static map<string, sai_port_fec_mode_t> fec_mode_map =

tests/test_watermark.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class TestWatermark(object):
2222

2323
DEFAULT_TELEMETRY_INTERVAL = 120
2424
NEW_INTERVAL = 5
25+
DEFAULT_POLL_INTERVAL = 10
2526

2627
def enable_unittests(self, dvs, status):
2728
db = swsscommon.DBConnector(swsscommon.ASIC_DB, dvs.redis_sock, 0)
@@ -57,7 +58,7 @@ def populate_asic_all(self, dvs, val):
5758
self.populate_asic(dvs, "SAI_OBJECT_TYPE_QUEUE", SaiWmStats.queue_shared, val)
5859
self.populate_asic(dvs, "SAI_OBJECT_TYPE_INGRESS_PRIORITY_GROUP", SaiWmStats.pg_shared, val)
5960
self.populate_asic(dvs, "SAI_OBJECT_TYPE_INGRESS_PRIORITY_GROUP", SaiWmStats.pg_headroom, val)
60-
time.sleep(1)
61+
time.sleep(self.DEFAULT_POLL_INTERVAL)
6162

6263
def verify_value(self, dvs, obj_ids, table_name, watermark_name, expected_value):
6364

0 commit comments

Comments
 (0)