]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_system: deferred-handling logic in test_upload_and_download was broken
authorBrian Warner <warner@allmydata.com>
Wed, 6 Feb 2008 21:05:11 +0000 (14:05 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 6 Feb 2008 21:05:11 +0000 (14:05 -0700)
src/allmydata/test/test_system.py

index c307ef9d396594b888bbfb48c89048d2fbd19c6c..59bc91124ac5552cd9b68af3816b43e6df33fc98 100644 (file)
@@ -380,20 +380,18 @@ class SystemTest(testutil.SignalMixin, testutil.PollMixin, unittest.TestCase):
                     self.failIf(os.path.exists(incdir) and os.listdir(incdir))
             d.addCallback(_disconnected)
 
-            def _wait_for_reconnect(res):
-                # then we need to give the reconnector a chance to
-                # reestablish the connection to the helper.
-                d.addCallback(lambda res:
-                              log.msg("wait_for_connections", level=log.NOISY,
-                                      facility="tahoe.test.test_system"))
-                d.addCallback(lambda res: self.wait_for_connections())
-            d.addCallback(_wait_for_reconnect)
-
-            def _upload_again(res):
-                log.msg("uploading again", level=log.NOISY,
-                        facility="tahoe.test.test_system")
-                return self.extra_node.upload(u2)
-            d.addCallbacks(_upload_again)
+            # then we need to give the reconnector a chance to
+            # reestablish the connection to the helper.
+            d.addCallback(lambda res:
+                          log.msg("wait_for_connections", level=log.NOISY,
+                                  facility="tahoe.test.test_system"))
+            d.addCallback(lambda res: self.wait_for_connections())
+
+
+            d.addCallback(lambda res:
+                          log.msg("uploading again", level=log.NOISY,
+                                  facility="tahoe.test.test_system"))
+            d.addCallback(lambda res: self.extra_node.upload(u2))
 
             def _uploaded(results):
                 uri = results.uri