Beispiel #1
0
    def test_launch_thread(self):
        eventlet.spawn(launch.launch_any, ['engine'])

        for i in range(0, 50):
            svr_thrd_mgr = launch.get_server_thread_manager()

            if svr_thrd_mgr:
                break

            eventlet.sleep(0.1)

        svr_proc_mgr = launch.get_server_process_manager()

        self.assertIsNone(svr_proc_mgr)
        self.assertIsNotNone(svr_thrd_mgr)

        self._await(lambda: len(svr_thrd_mgr.services.services) == 1)
Beispiel #2
0
    def test_launch_thread(self):
        eventlet.spawn(launch.launch_any, ['engine'])

        for i in range(0, 50):
            svr_thrd_mgr = launch.get_server_thread_manager()

            if svr_thrd_mgr:
                break

            eventlet.sleep(0.1)

        svr_proc_mgr = launch.get_server_process_manager()

        self.assertIsNone(svr_proc_mgr)
        self.assertIsNotNone(svr_thrd_mgr)

        self._await(lambda: len(svr_thrd_mgr.services.services) == 1)
Beispiel #3
0
    def test_launch_process(self):
        eventlet.spawn(launch.launch_any, ['api'])

        for i in range(0, 50):
            svr_proc_mgr = launch.get_server_process_manager()

            if svr_proc_mgr:
                break

            eventlet.sleep(0.1)

        svr_thrd_mgr = launch.get_server_thread_manager()

        self.assertIsNotNone(svr_proc_mgr)
        self.assertIsNone(svr_thrd_mgr)

        api_server = api_service.WSGIService('mistral_api')
        api_workers = api_server.workers

        self._await(lambda: len(svr_proc_mgr.children.keys()) == api_workers)
Beispiel #4
0
    def test_launch_process(self):
        eventlet.spawn(launch.launch_any, ['api'])

        for i in range(0, 50):
            svr_proc_mgr = launch.get_server_process_manager()

            if svr_proc_mgr:
                break

            eventlet.sleep(0.1)

        svr_thrd_mgr = launch.get_server_thread_manager()

        self.assertIsNotNone(svr_proc_mgr)
        self.assertIsNone(svr_thrd_mgr)

        api_server = api_service.WSGIService('mistral_api')
        api_workers = api_server.workers

        self._await(lambda: len(svr_proc_mgr.children.keys()) == api_workers)