mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 17:52:50 +00:00
only break it once because we don't do a full iteration after, now
This commit is contained in:
parent
d3fde4a4c5
commit
6a4d461d38
@ -1084,18 +1084,17 @@ class MagicFolderAliceBobTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, Rea
|
|||||||
# now, we ONLY want to do the scan, not a full iteration of
|
# now, we ONLY want to do the scan, not a full iteration of
|
||||||
# the process loop. So we do just the scan part "by hand" in
|
# the process loop. So we do just the scan part "by hand" in
|
||||||
# Bob's downloader
|
# Bob's downloader
|
||||||
|
|
||||||
# break all the servers so the download fails. the count is 2
|
|
||||||
# because the "full iteration" will do a scan (downloading the
|
|
||||||
# metadata file) and then process the deque (trying to
|
|
||||||
# download the item we queued up already)
|
|
||||||
with start_action(action_type=u"test:perform-scan"):
|
with start_action(action_type=u"test:perform-scan"):
|
||||||
yield self.bob_magicfolder.downloader._perform_scan()
|
yield self.bob_magicfolder.downloader._perform_scan()
|
||||||
# while we're delving into internals, I guess we might as well
|
# while we're delving into internals, I guess we might as well
|
||||||
# confirm that we did queue up an item to download
|
# confirm that we did queue up an item to download
|
||||||
self.assertEqual(1, len(self.bob_magicfolder.downloader._deque))
|
self.assertEqual(1, len(self.bob_magicfolder.downloader._deque))
|
||||||
|
|
||||||
|
# break all the servers so the download fails. count=1 because we
|
||||||
|
# only want the download attempted by _process_deque to fail. After
|
||||||
|
# that, we want it to work again.
|
||||||
for server_id in self.g.get_all_serverids():
|
for server_id in self.g.get_all_serverids():
|
||||||
self.g.break_server(server_id, count=2)
|
self.g.break_server(server_id, count=1)
|
||||||
|
|
||||||
# now let bob try to do the download. Reach in and call
|
# now let bob try to do the download. Reach in and call
|
||||||
# _process_deque directly because we are already half-way through a
|
# _process_deque directly because we are already half-way through a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user