]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commit - src/allmydata/test/test_system.py
test_system.py: clean up control flow, reduce use of stall()
authorBrian Warner <warner@lothar.com>
Tue, 12 Jun 2012 01:22:35 +0000 (18:22 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 12 Jun 2012 01:22:35 +0000 (18:22 -0700)
commit5e432b12a120b58a2f94b4ab5537fbeed65e9ffe
treeac2908db2c5e2d1b3307cb490214ccf1e7edd888
parent82519ef93f6ab21a7ce06cb0e82b84f849dfbb0e
test_system.py: clean up control flow, reduce use of stall()

The _upload_resumable() test interrupts a Helper upload partway
through (by shutting down the Helper), then restarts the Helper and
resumes the upload. The control flow is kind of tricky: to do anything
"partway through" requires adding a hook to the Uploadable. The previous
flow depended upon a (fragile) call to self.stall(), which waits a fixed
number of seconds.

This removes one of those stall() calls (the remainder is in
test/common.py and I'll try removing it in a subsequent revision). It
also removes some now-redundant wait_for_connections() calls, since
bounce_client() doesn't fire its Deferred until the client has finished
coming back up (and uses wait_for_connections() internally to do so).
src/allmydata/test/test_system.py