Sometimes when controller process cleanup happens concurrently with testbed teardown...
[nepi.git] / test / core / integration.py
index d58dc86..3618c87 100755 (executable)
@@ -25,7 +25,12 @@ class ExecuteTestCase(unittest.TestCase):
         self.root_dir = tempfile.mkdtemp()
 
     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)
 
     def make_testbed(self, exp_desc, testbed_id, testbed_version):
         provider = FactoriesProvider(testbed_id, testbed_version)