Example #1
0
 def _startManager(self, state):
     port = tryPort()
     managerSpawner = LocalManagerSpawner(port)
     managerSpawner.connect('error', self._on_spawner_error, state)
     managerSpawner.connect('description-changed',
                            self._on_spawner_description_changed)
     managerSpawner.connect('finished', self._on_spawner_finished, state)
     managerSpawner.start()
Example #2
0
 def _startManager(self, state):
     port = tryPort()
     managerSpawner = LocalManagerSpawner(port)
     managerSpawner.connect("error", self._on_spawner_error, state)
     managerSpawner.connect("description-changed", self._on_spawner_description_changed)
     managerSpawner.connect("finished", self._on_spawner_finished, state)
     managerSpawner.start()
    def testManagerStart(self):
        spawner = LocalManagerSpawner(self._port)

        def done(unused):
            self.assert_(os.path.exists(spawner.getRunDir()))
            self.assert_(os.path.exists(spawner.getConfDir()))
            self.assert_(os.path.exists(spawner.getLogDir()))
            self.checkProcessStatus(True, spawner.getRunDir(),
                                    spawner.getLogDir())
            return spawner.stop(True)

        d = spawner.start()
        d.addCallback(done)
        return d
    def testManagerStart(self):
        spawner = LocalManagerSpawner(self._port)

        def done(unused):
            self.assert_(os.path.exists(spawner.getRunDir()))
            self.assert_(os.path.exists(spawner.getConfDir()))
            self.assert_(os.path.exists(spawner.getLogDir()))
            self.checkProcessStatus(True,
                    spawner.getRunDir(),
                    spawner.getLogDir())
            return spawner.stop(True)

        d = spawner.start()
        d.addCallback(done)
        return d
    def testManagerStopAndCleanUp(self):
        spawner = LocalManagerSpawner(self._port)
        runDir = spawner.getRunDir()
        confDir = spawner.getConfDir()
        logDir = spawner.getLogDir()

        def closeDone(unused):
            self.assert_(not os.path.exists(runDir))
            self.assert_(not os.path.exists(confDir))
            self.assert_(not os.path.exists(logDir))
            self.checkProcessStatus(False, runDir, logDir)

        def startDone(unused):
            return spawner.stop(True)

        d = spawner.start()
        d.addCallback(startDone)
        d.addCallback(closeDone)
        return d
    def testManagerStopAndCleanUp(self):
        spawner = LocalManagerSpawner(self._port)
        runDir = spawner.getRunDir()
        confDir = spawner.getConfDir()
        logDir = spawner.getLogDir()

        def closeDone(unused):
            self.assert_(not os.path.exists(runDir))
            self.assert_(not os.path.exists(confDir))
            self.assert_(not os.path.exists(logDir))
            self.checkProcessStatus(False, runDir, logDir)

        def startDone(unused):
            return spawner.stop(True)

        d = spawner.start()
        d.addCallback(startDone)
        d.addCallback(closeDone)
        return d
 def testPort(self):
     spawner = LocalManagerSpawner(self._port)
     self.assertEquals(self._port, spawner.getPort())
     spawner = None
 def testPort(self):
     spawner = LocalManagerSpawner(self._port)
     self.assertEquals(self._port, spawner.getPort())
     spawner = None