#2497 closed defect (fixed)

Magic Folder: add a restart_client method to NoNetworkGrid in order to fix tests

Reported by: daira Owned by: daira
Priority: normal Milestone: undecided
Component: code-frontend-magic-folder Version: 1.10.1
Keywords: otf-magic-folder-objective4 tests Cc:
Launchpad Bug:

Description (last modified by daira)

daira: dawuud: there is a shallow reason why test_magicfolder_start_service
 doesn't work on the current 2489.write_downloaded_file.1 branch, and a
 deeper reason
daira: the shallow reason is that self.basedir needs to be created before
 self.local_dir
daira: the deeper reason is that create_invite_join_magic_folder depends
 on the client already existing
daira: so we cannot call it in the client_config_hook, because that's
 called in order to create the client
daira: and self.g.clients[0] is not set until it has returned (in fact,
 self.g is not set until all the config hooks have returned)
daira: so we do need to set up the grid first, then call
 create_invite_join_magic_folder, then restart the client
daira: I think the cleanest way to handle this is to add a
 restart_client(self, i=0) method to NoNetworkGrid
daira: (it would be asynchronous)
daira: incidentally, NoNetworkGrid is a misnomer because the client does
 listen on loopback to its web port. it's only the connections between
 clients and servers that are no-network
daira: (if the client didn't listen on its web port then
 create_invite_join_magic_folder wouldn't work)

Change History (3)

comment:2 Changed at 2015-09-03T15:03:04Z by daira

  • Summary changed from fix Magic Folder tests to Magic Folder: add a restart_client method to NoNetworkGrid in order to fix tests

comment:3 Changed at 2015-09-08T14:35:54Z by daira

  • Resolution set to fixed
  • Status changed from new to closed

Fixed on the same branch.

Note: See TracTickets for help on using tickets.