

def test_job_can_shutdown_th(self):
    self._load_config_fixture('shutdown-config.yaml')
    self.start_server()
    zuul = fakes.FakeZuul(self.config['zuul_server']['gearman_host'], self.config['zuul_server']['gearman_port'])
    data_req = zuul.make_zuul_data()
    zuul.submit_job('build:demo_job_clean', data_req)
    zuul.wait_for_completion()
    self.assertTrue(zuul.job.complete)
    self.assertFalse(data_req.worker_server.stopped())
    zuul.job = None
    zuul.submit_job('build:demo_job_dirty', data_req)
    zuul.wait_for_completion()
    self.assertTrue(zuul.job.complete)
    time.sleep(1)
    self.assertTrue(self.worker_server.stopped())

dataset/ETHPy150Open openstack/turbo-hipster/tests/disabled_worker_manager.py TestZuulClient.test_job_can_shutdown_th/VarMisuse@88/150 `self`->`data_req`