Sometimes when controller process cleanup happens concurrently with testbed teardown...
[nepi.git] / test / testbeds / planetlab / integration.py
index e7e34d3..0edcb1e 100755 (executable)
@@ -18,7 +18,12 @@ class PlanetLabIntegrationTestCase(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_experiment_desc(self):
         testbed_id = "planetlab"