summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2018-11-15 08:13:03 -0800
committerOle Trøan <otroan@employees.org>2018-11-16 07:27:22 +0000
commitdd4b2bb39491cb8fbfb5db8a4b9ffc3b80beba48 (patch)
tree7fb496a1f09bb2cbcedc54c06c48369941814990
parent18668840e9ef885a34b5d428543b03f31f68aaaf (diff)
VPP-1495: Fix intermittent stat sock test failures.
Loosen polling loop while waiting for stats socket. ============================================================================== Classifier IP6 UDP proto Test Case ============================================================================== connect: No such file or directory ============================================================================== ERROR: setUpClass (test_ip4.TestIPLoadBalance) ------------------------------------------------------------------------------ Traceback (most recent call last): File "/vpp/test/framework.py", line 424, in setUpClass cls.statistics = VPPStats(socketname=cls.stats_sock) File "build/bdist.linux-x86_64/egg/vpp_papi/vpp_stats.py", line 120, in _init_ raise IOError() IOError Change-Id: I80523122f96eafc41b3ebbf27bee73f6c637d781 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
-rw-r--r--test/framework.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/framework.py b/test/framework.py
index 3201e632348..06876a1799b 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -356,9 +356,15 @@ class VppTestCase(unittest.TestCase):
@classmethod
def wait_for_stats_socket(cls):
deadline = time.time() + 3
- while time.time() < deadline or cls.debug_gdb or cls.debug_gdbserver:
+ ok = False
+ while time.time() < deadline or \
+ cls.debug_gdb or cls.debug_gdbserver:
if os.path.exists(cls.stats_sock):
+ ok = True
break
+ time.sleep(0.8)
+ if not ok:
+ cls.logger.critical("Couldn't stat : {}".format(cls.stats_sock))
@classmethod
def setUpClass(cls):