def ShutdownHelperToolsForTestSuite(self):
     """Shuts down the server and the forwarder."""
     # Forwarders should be killed before the actual servers they're forwarding
     # to as they are clients potentially with open connections and to allow for
     # proper hand-shake/shutdown.
     Forwarder.KillDevice(self.adb)
     if self._http_server:
         self._http_server.ShutdownHttpServer()
     if self._spawning_server:
         self._spawning_server.Stop()
     self.flags.Restore()
 def SetUp(self):
     """Called before tests run."""
     Forwarder.KillDevice(self.adb)