There is a race condition as it's possible that the client
is run before the server starts listening on the zmq port.
Wait 5 seconds before starting the client.
Signed-off-by: Adrian Moreno <amorenoz(a)redhat.com>
---
lnst/RecipeCommon/Perf/Measurements/TRexFlowMeasurement.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lnst/RecipeCommon/Perf/Measurements/TRexFlowMeasurement.py
b/lnst/RecipeCommon/Perf/Measurements/TRexFlowMeasurement.py
index 3aba4cd..32fbf8c 100644
--- a/lnst/RecipeCommon/Perf/Measurements/TRexFlowMeasurement.py
+++ b/lnst/RecipeCommon/Perf/Measurements/TRexFlowMeasurement.py
@@ -33,6 +33,9 @@ class TRexFlowMeasurement(BaseFlowMeasurement):
for test in tests:
test.server_job.start(bg=True)
+ #wait for Trex server to start
+ time.sleep(5)
+
for test in tests:
test.client_job.start(bg=True)
--
2.21.0