Skip to content

Commit

Permalink
add some sleep on test case
Browse files Browse the repository at this point in the history
Signed-off-by: shine.chen <[email protected]>
  • Loading branch information
shine.chen committed Nov 30, 2019
1 parent 9bd1b17 commit 39e087f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cfgmgr/intfmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "intfmgr.h"
#include "exec.h"
#include "shellcmd.h"
#include "macaddress.h"

using namespace std;
using namespace swss;
Expand Down Expand Up @@ -461,7 +462,7 @@ bool IntfMgr::doIntfGeneralTask(const vector<string>& keys,
}
else
{
FieldValueTuple fvTuple("mac", mac);
FieldValueTuple fvTuple("mac_addr", MacAddress().to_string());
data.push_back(fvTuple);
}

Expand Down
8 changes: 8 additions & 0 deletions tests/test_intf_mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def test_InterfaceSetMac(self, dvs, testlog):
values = dict(fvs)
assert values["mac_addr"] == "6C:EC:5A:11:22:33"

time.sleep(3)

# check ASIC router interface database
src_mac_addr_found = self.find_mac(dvs, "Ethernet8", "6C:EC:5A:11:22:33")
assert src_mac_addr_found == True
Expand Down Expand Up @@ -87,6 +89,8 @@ def test_InterfaceChangeMac(self, dvs, testlog):
assert status == True
values = dict(fvs)
assert values["mac_addr"] == "6C:EC:5A:33:44:55"

time.sleep(3)

# check ASIC router interface database
src_mac_addr_found = self.find_mac(dvs, "Ethernet12", "6C:EC:5A:33:44:55")
Expand Down Expand Up @@ -188,6 +192,8 @@ def test_InterfaceSetMac(self, dvs, testlog):
assert len(lag_entries) == 1
lag_oid = lag_entries[0]

time.sleep(3)

# check ASIC router interface database
src_mac_addr_found = self.find_mac(dvs, lag_oid, "6C:EC:5A:11:22:33")
assert src_mac_addr_found == True
Expand Down Expand Up @@ -229,6 +235,8 @@ def test_InterfaceChangeMac(self, dvs, testlog):
# At this point there should be only one lag in the system, which is PortChannel002.
assert len(lag_entries) == 1
lag_oid = lag_entries[0]

time.sleep(3)

# check ASIC router interface database
src_mac_addr_found = self.find_mac(dvs, lag_oid, "6C:EC:5A:33:44:55")
Expand Down

0 comments on commit 39e087f

Please sign in to comment.