def exclusive_host(request): def clean_up(): teardown_mesos_agent(mc_config, 0, is_exclusive=True) run_mesos_agent(mc_config, 0, 0) time.sleep(5) # Remove agent #0 and instead create exclusive agent #0 teardown_mesos_agent(mc_config, 0) run_mesos_agent(mc_config, 0, 3, is_exclusive=True, exclusive_label_value='exclusive-test-label') time.sleep(5) request.addfinalizer(clean_up)
def clean_up(): teardown_mesos_agent(mc_config, 0, is_exclusive=True) run_mesos_agent(mc_config, 0, 0) time.sleep(5)