tests: python3 changes for load balancer test 98/22798/3
authorsnaramre <snaramre@cisco.com>
Wed, 16 Oct 2019 22:36:47 +0000 (22:36 +0000)
committerOle Trøan <otroan@employees.org>
Thu, 17 Oct 2019 17:59:07 +0000 (17:59 +0000)
Type: fix
Change-Id: Id9a328158e7c4106a95928bf8ddceb7b9e73aa25
Signed-off-by: snaramre <snaramre@cisco.com>
src/plugins/lb/test/test_lb.py

index 4603bd1..fafb87b 100644 (file)
@@ -200,7 +200,7 @@ class TestLB(VppTestCase):
         # This is just to roughly check that the balancing algorithm
         # is not completely biased.
         for asid in self.ass:
-            if load[asid] < len(self.packets) / (len(self.ass) * 2):
+            if load[asid] < int(len(self.packets) / (len(self.ass) * 2)):
                 self.logger.error(
                     "ASS is not balanced: load[%d] = %d" % (asid, load[asid]))
                 raise Exception("Load Balancer algorithm is biased")