[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2497: fix Magic Folder tests

Tahoe-LAFS trac at tahoe-lafs.org
Thu Sep 3 15:01:46 UTC 2015


#2497: fix Magic Folder tests
-------------------------------------+-------------------------------------
     Reporter:  daira                |      Owner:  daira
         Type:  defect               |     Status:  new
     Priority:  normal               |  Milestone:  undecided
    Component:  code-frontend-       |    Version:  1.10.1
  magic-folder                       |   Keywords:  otf-magic-folder-
   Resolution:                       |  objective4 tests
Launchpad Bug:                       |
-------------------------------------+-------------------------------------

Old description:

> {{{
> 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)
> }}}

New description:

 {{{
 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)
 }}}

--

Comment (by daira):

 Work in progress branch [https://github.com/tahoe-lafs/tahoe-lafs/2497
 .fix-magic-folder-tests.0].

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2497#comment:1>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list