aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorManuel Buil <manuel.buil@ericsson.com>2016-11-14 11:54:06 +0100
committerGeorge Paraskevopoulos <geopar@intracom-telecom.com>2016-11-17 16:13:50 +0200
commit7fdcc01c163f1527b578d1793889dc2eed5ec78e (patch)
treeec24c0576cf818afc90ed8d4ad0f649f38af64eb /testcases
parent903ff93fc995c84f22a374df8f63ffd841b4e07f (diff)
Bug fix odl-sfc
I was not taking into account the case where the returned list is empty Change-Id: I533ea8fbc286cb564dccec06750cd1a8bbcf52f9 Signed-off-by: Manuel Buil <manuel.buil@ericsson.com>
Diffstat (limited to 'testcases')
-rwxr-xr-xtestcases/features/sfc/sfc.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/testcases/features/sfc/sfc.py b/testcases/features/sfc/sfc.py
index 0ba292d1b..376083555 100755
--- a/testcases/features/sfc/sfc.py
+++ b/testcases/features/sfc/sfc.py
@@ -415,15 +415,20 @@ def capture_time_log(compute_clients):
while True:
rsps = ovs_logger.ofctl_time_counter(compute_clients[0])
if not i:
- first_RSP = rsps[0]
- i = i + 1
- if(first_RSP != rsps[0] and len(rsps) > 1):
- if (rsps[0] == rsps[1]):
- stop_time = time.time()
- logger.info("classification rules updated")
- difference = stop_time - start_time
- logger.info("It took %s seconds" % difference)
- break
+ if len(rsps) > 0:
+ first_RSP = rsps[0]
+ i = i + 1
+ else:
+ first_RSP = 0
+ i = i + 1
+ if (len(rsps) > 1):
+ if(first_RSP != rsps[0]):
+ if (rsps[0] == rsps[1]):
+ stop_time = time.time()
+ logger.info("classification rules updated")
+ difference = stop_time - start_time
+ logger.info("It took %s seconds" % difference)
+ break
time.sleep(1)
return