[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2966: src/allmydata/test/no_network.py, _NoNetworkClient.stopService fails to return a result

Tahoe-LAFS trac at tahoe-lafs.org
Wed Jan 30 17:26:40 UTC 2019


#2966: src/allmydata/test/no_network.py, _NoNetworkClient.stopService fails to
return a result
--------------------------------+---------------------------
 Reporter:  exarkun             |          Owner:
     Type:  defect              |         Status:  new
 Priority:  normal              |      Milestone:  undecided
Component:  dev-infrastructure  |        Version:  1.12.1
 Keywords:                      |  Launchpad Bug:
--------------------------------+---------------------------
 `_NoNetworkClient` is part of the test infrastructure to be able to test
 `Node` without doing lots of failure-prone (and, I guess, unnecessary)
 network operations.

 It overrides startService and stopService to bypass the normal node
 startup and shutdown.  However, its stopService implementation fails to
 return the result of the upcall it makes:

 {{{
     def stopService(self):
         service.MultiService.stopService(self)
 }}}

 `stopService` is defined as returning a Deferred which fires when the
 service has stopped.  By failing to return the result of the upcall, none
 of the child services of the service collection will have their shutdown
 Deferreds waited on.  This leads to premature test completion which leads
 to "dirty reactor" errors from trial.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2966>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


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