Merge "Run testcase 074 result overridden by job status" into stable/gambia
[yardstick.git] / yardstick / network_services / traffic_profile / prox_profile.py
index 343ef1d..be450c9 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2017 Intel Corporation
+# Copyright (c) 2016-2018 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
 from __future__ import absolute_import
 
 import logging
+import multiprocessing
+import time
 
 from yardstick.network_services.traffic_profile.base import TrafficProfile
 from yardstick.network_services.vnf_generic.vnf.prox_helpers import ProxProfileHelper
@@ -56,7 +58,7 @@ class ProxProfile(TrafficProfile):
     def __init__(self, tp_config):
         super(ProxProfile, self).__init__(tp_config)
         self.queue = None
-        self.done = False
+        self.done = multiprocessing.Event()
         self.results = []
 
         # TODO: get init values from tp_config
@@ -116,7 +118,8 @@ class ProxProfile(TrafficProfile):
         try:
             pkt_size = next(self.pkt_size_iterator)
         except StopIteration:
-            self.done = True
+            time.sleep(5)
+            self.done.set()
             return
 
         # Adjust packet size upwards if it's less than the minimum