Skip to content

Commit

Permalink
[test_watermark] avoid watermark clear vs test random failure (sonic-…
Browse files Browse the repository at this point in the history
…net#873)

Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
  • Loading branch information
mykolaf authored and lguohan committed May 4, 2019
1 parent ea4cba6 commit 9818b78
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_watermark.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ def test_clear(self, dvs):

# clear pg shared watermark, and verify that headroom watermark and persistent watermarks are not affected

dvs.runcmd("sonic-clear priority-group watermark shared")

exitcode, output = dvs.runcmd("sonic-clear priority-group watermark shared")
time.sleep(1)
assert exitcode == 0, "CLI failure: %s" % output
# make sure it cleared
self.verify_value(dvs, self.pgs, WmTables.user, SaiWmStats.pg_shared, "0")

Expand All @@ -201,7 +202,9 @@ def test_clear(self, dvs):

# clear queue unicast persistent watermark, and verify that multicast watermark and user watermarks are not affected

dvs.runcmd("sonic-clear queue persistent-watermark unicast")
exitcode, output = dvs.runcmd("sonic-clear queue persistent-watermark unicast")
time.sleep(1)
assert exitcode == 0, "CLI failure: %s" % output

# make sure it cleared
self.verify_value(dvs, self.uc_q, WmTables.persistent, SaiWmStats.queue_shared, "0")
Expand Down

0 comments on commit 9818b78

Please sign in to comment.