fixed sleep position and verify_queuestats
diff --git a/tests/FuncUtils.py b/tests/FuncUtils.py
index d37e6ef..ad00246 100644
--- a/tests/FuncUtils.py
+++ b/tests/FuncUtils.py
@@ -648,6 +648,8 @@
lookedup = 0
matched = 0
active = 0
+
+ sleep(1)
for item in response.stats:
@@ -664,7 +666,7 @@
if expect_active != None and expect_active != active:continue
break
- sleep(1)
+
if expect_lookup != None :
self.assertEqual(expect_lookup,item.lookup_count,"lookup counter is not incremented properly")
@@ -692,6 +694,8 @@
packet_counter = 0
byte_counter = 0
+ sleep(1)
+
for item in response.stats:
packet_counter += item.packet_count
byte_counter += item.byte_count
@@ -704,7 +708,7 @@
if byte_count != None and byte_count != byte_counter: continue
break
- sleep(1)
+
if packet_count != None :
self.assertEqual(packet_count,item.packet_count,"packet_count counter is not incremented correctly")
@@ -730,6 +734,8 @@
sentp = recvp = 0
sentb = recvb = 0
+
+ sleep(1)
for item in response.stats:
sentp += item.tx_packets
@@ -750,7 +756,7 @@
break
- sleep(1)
+
if (tx_packets != None):
self.assertEqual(tx_packets,item.tx_packets,"rx_packets counter is not incremented correctly")
@@ -779,8 +785,10 @@
self.assertNotEqual(queue_stats, None, "Queue stats request failed")
packet_counter = 0
byte_counter = 0
+
+ sleep(1)
- for item in queue_stats.stats[0]:
+ for item in queue_stats.stats:
packet_counter += item.tx_packets
byte_counter += item.tx_bytes
@@ -791,7 +799,7 @@
if expect_byte != None and byte_counter != expect_byte: continue
break
- sleep(1)
+
if expect_packet != None :
self.assertEqual(packet_counter,expect_packet,"tx_packets counter is not incremented correctly")