tests: fix race condition in punt tests 45/32245/2
authorDave Wallace <dwallacelf@gmail.com>
Thu, 6 May 2021 19:59:59 +0000 (15:59 -0400)
committerDamjan Marion <dmarion@me.com>
Thu, 6 May 2021 21:16:08 +0000 (21:16 +0000)
Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I6cb13e044bbb966cbb61802094e96220d3a0c951

test/test_punt.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index c6d6dbc..bc2196e
@@ -83,6 +83,7 @@ class serverSocketThread(threading.Thread):
     def close(self):
         self.sock.close()
         self.keep_running = False
+        threading.Thread.join(self)
         return self.rx_pkts
 
 
@@ -131,7 +132,6 @@ class TestPuntSocket(VppTestCase):
         rx_pkts = []
         for thread in self.sock_servers:
             rx_pkts += thread.close()
-            thread.join()
         return rx_pkts
 
     def verify_port(self, pr, vpr):