From 6e6aae0a0daf3a480f9c21b1c3e1e2c127db6d8d Mon Sep 17 00:00:00 2001
From: Daira Hopwood <daira@jacaranda.org>
Date: Thu, 3 Sep 2015 20:21:10 +0100
Subject: [PATCH] Solve a potential race condition by waiting until the
 uploader is started.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
---
 src/allmydata/test/test_magic_folder.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py
index 3d76799f..ecb08a6a 100644
--- a/src/allmydata/test/test_magic_folder.py
+++ b/src/allmydata/test/test_magic_folder.py
@@ -49,6 +49,7 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
         def _restarted(ign):
             print "_restarted"
             self.magicfolder = self.get_client().getServiceNamed('magic-folder')
+            return self.magicfolder.uploader.started_d
         d.addCallback(_restarted)
         return d
 
-- 
2.45.2