예제 #1
0
 def setUp(self):
     TestCircus.setUp(self)
     self.app = TestApp(app)
     self.stream = QueueStream()
     # let's run a circus
     cmd = [sys.executable, "-c",
            "from circus import circusd; circusd.main()", cfg]
     self.p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                               stderr=subprocess.PIPE)
예제 #2
0
 def setUp(self):
     TestCircus.setUp(self)
     self.app = TestApp(app)
     self.stream = QueueStream()
     # let's run a circus
     cmd = '%s -c "from circus import circusd; circusd.main()" %s' % \
         (sys.executable, cfg)
     self.p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
                               stderr=subprocess.PIPE)
예제 #3
0
 def setUp(self):
     TestCircus.setUp(self)
     self.app = TestApp(app)
     self.stream = QueueStream()
     # let's run a circus
     cmd = '%s -c "from circus import circusd; circusd.main()" %s' % \
         (sys.executable, cfg)
     self.p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE)
예제 #4
0
 def setUp(self):
     TestCircus.setUp(self)
     self.app = TestApp(app)
     self.stream = QueueStream()
     # let's run a circus
     cmd = [sys.executable, "-c", "from circus import circusd; circusd.main()", cfg]
     self.p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     # Start auto discovery thread
     setup_auto_discovery(DEFAULT_ENDPOINT_MULTICAST)
예제 #5
0
    def tearDown(self):
        self.p.terminate()
        try:
            with gevent.Timeout(1):
                while self.p.poll() is None:
                    gevent.sleep(0.1)
        except gevent.Timeout:
            self.p.kill()

        TestCircus.tearDown(self)
예제 #6
0
    def tearDown(self):
        self.p.terminate()
        counter = 0
        while self.p.poll() is None and counter < 10:
            counter += 1
            time.sleep(0.1)
        if self.p.returncode is None:
            self.p.kill()

        TestCircus.tearDown(self)
예제 #7
0
    def tearDown(self):
        self.p.terminate()
        counter = 0
        while self.p.poll() is None and counter < 10:
            counter += 1
            time.sleep(0.1)
        if self.p.returncode is None:
            self.p.kill()

        TestCircus.tearDown(self)
예제 #8
0
 def setUp(self):
     TestCircus.setUp(self)
     self.app = TestApp(app)
     self.stream = QueueStream()
     # let's run a circus
     cmd = [sys.executable, "-c",
            "from circus import circusd; circusd.main()", cfg]
     self.p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                               stderr=subprocess.PIPE)
     # Start auto discovery thread
     setup_auto_discovery(DEFAULT_ENDPOINT_MULTICAST)
예제 #9
0
    def tearDown(self):
        TestCircus.tearDown(self)

        return

        # XXX to be fixed
        subprocess.call(['rm', SSH_ID_DSA])
        subprocess.call(['rm', SSH_ID_DSA_PUB])
        subprocess.call(['rm', SSH_AUTHORIZED_KEYS])
        subprocess.call(['mv', COPY_ID_DSA, SSH_ID_DSA])
        subprocess.call(['mv', COPY_ID_DSA_PUB, SSH_ID_DSA_PUB])
        subprocess.call(['mv', COPY_AUTHORIZED_KEYS, SSH_AUTHORIZED_KEYS])
        subprocess.call(['ssh-add'])
예제 #10
0
    def tearDown(self):
        TestCircus.tearDown(self)

        return

        # XXX to be fixed
        subprocess.call(['rm', SSH_ID_DSA])
        subprocess.call(['rm', SSH_ID_DSA_PUB])
        subprocess.call(['rm', SSH_AUTHORIZED_KEYS])
        subprocess.call(['mv', COPY_ID_DSA, SSH_ID_DSA])
        subprocess.call(['mv', COPY_ID_DSA_PUB, SSH_ID_DSA_PUB])
        subprocess.call(['mv', COPY_AUTHORIZED_KEYS, SSH_AUTHORIZED_KEYS])
        subprocess.call(['ssh-add'])
예제 #11
0
    def setUp(self):
        TestCircus.setUp(self)

        return
        # XXX to be fixed
        subprocess.call(['mv', SSH_ID_DSA, COPY_ID_DSA])
        subprocess.call(['mv', SSH_ID_DSA_PUB, COPY_ID_DSA_PUB])
        subprocess.call(['mv', SSH_AUTHORIZED_KEYS, COPY_AUTHORIZED_KEYS])
        subprocess.call(['cp', 'circus/tests/test_dsa', SSH_ID_DSA])
        subprocess.call(['cp', 'circus/tests/test_dsa.pub', SSH_ID_DSA_PUB])
        subprocess.call(
            ['cp', 'circus/tests/test_dsa.pub', SSH_AUTHORIZED_KEYS])
        subprocess.call(['ssh-add'])
예제 #12
0
    def setUp(self):
        TestCircus.setUp(self)

        return
        # XXX to be fixed
        subprocess.call(['mv', SSH_ID_DSA, COPY_ID_DSA])
        subprocess.call(['mv', SSH_ID_DSA_PUB, COPY_ID_DSA_PUB])
        subprocess.call(['mv', SSH_AUTHORIZED_KEYS, COPY_AUTHORIZED_KEYS])
        subprocess.call(['cp', 'circus/tests/test_dsa', SSH_ID_DSA])
        subprocess.call(['cp', 'circus/tests/test_dsa.pub', SSH_ID_DSA_PUB])
        subprocess.call(['cp', 'circus/tests/test_dsa.pub',
                            SSH_AUTHORIZED_KEYS])
        subprocess.call(['ssh-add'])
예제 #13
0
 def tearDown(self):
     self.p.terminate()
     self.p.kill()
     time.sleep(0.4)
     TestCircus.tearDown(self)
예제 #14
0
 def tearDown(self):
     self.p.terminate()
     self.p.kill()
     time.sleep(0.4)
     TestCircus.tearDown(self)
예제 #15
0
 def setUp(self):
     TestCircus.setUp(self)
예제 #16
0
 def tearDown(self):
     self.p.terminate()
     self.p.kill()
     TestCircus.tearDown(self)
예제 #17
0
 def setUp(self):
     TestCircus.setUp(self)