Sometimes when controller process cleanup happens concurrently with testbed teardown...
[nepi.git] / test / testbeds / ns3 / integration.py
index 61df6ae..f0926da 100755 (executable)
@@ -152,7 +152,12 @@ class Ns3IntegrationTestCase(unittest.TestCase):
         controller.shutdown()
 
     def tearDown(self):
-        shutil.rmtree(self.root_dir)
+        try:
+            shutil.rmtree(self.root_dir)
+        except:
+            # retry
+            time.sleep(0.1)
+            shutil.rmtree(self.root_dir)
 
 if __name__ == '__main__':
     unittest.main()