Insert a small timeout before reporting the test successful
authorPatrick Uiterwijk <puiterwijk@redhat.com>
Tue, 28 Apr 2015 18:26:40 +0000 (20:26 +0200)
committerPatrick Uiterwijk <puiterwijk@redhat.com>
Tue, 28 Apr 2015 19:50:28 +0000 (21:50 +0200)
This is so the OS gets enough time to clean up all
of the sockets used during the execution of the test.
Without this, sometimes a "port already in use" error
will fail the next test.

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Reviewed-by: Rob Crittenden <rcritten@redhat.com>
tests/tests.py

index 6dfd8c4..a8b42e4 100755 (executable)
@@ -23,6 +23,7 @@ from ipsilon.util import plugin
 import os
 import sys
 import subprocess
+import time
 import traceback
 
 
@@ -103,4 +104,6 @@ if __name__ == '__main__':
     finally:
         test.wait()
 
+    # Wait until all of the sockets are closed by the OS
+    time.sleep(0.5)
     print "FINISHED"