]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_system.py: investigate failure in allmydata.test.test_system.SystemTest.test_upl...
authordavid-sarah <david-sarah@jacaranda.org>
Wed, 16 Jun 2010 00:16:48 +0000 (17:16 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Wed, 16 Jun 2010 00:16:48 +0000 (17:16 -0700)
src/allmydata/test/test_system.py

index 59c8e7f1c2045a4ede02a18cb99f923c335a367f..0ad6c3585f59a9997b467883ff2996c9587719c1 100644 (file)
@@ -319,6 +319,7 @@ class SystemTest(SystemTestMixin, unittest.TestCase):
                 # this is really bytes received rather than sent, but it's
                 # convenient and basically measures the same thing
                 bytes_sent = results.ciphertext_fetched
+                self.failUnless(isinstance(bytes_sent, (int, long)), bytes_sent)
 
                 # We currently don't support resumption of upload if the data is
                 # encrypted with a random key.  (Because that would require us
@@ -329,16 +330,16 @@ class SystemTest(SystemTestMixin, unittest.TestCase):
                     # Make sure we did not have to read the whole file the
                     # second time around .
                     self.failUnless(bytes_sent < len(DATA),
-                                "resumption didn't save us any work:"
-                                " read %d bytes out of %d total" %
-                                (bytes_sent, len(DATA)))
+                                    "resumption didn't save us any work:"
+                                    " read %r bytes out of %r total" %
+                                    (bytes_sent, len(DATA)))
                 else:
                     # Make sure we did have to read the whole file the second
                     # time around -- because the one that we partially uploaded
                     # earlier was encrypted with a different random key.
                     self.failIf(bytes_sent < len(DATA),
                                 "resumption saved us some work even though we were using random keys:"
-                                " read %d bytes out of %d total" %
+                                " read %r bytes out of %r total" %
                                 (bytes_sent, len(DATA)))
                 n = self.clients[1].create_node_from_uri(cap)
                 return download_to_data(n)