def wait_for_marathon_and_cleanup(): print("entering wait_for_marathon_and_cleanup fixture") shakedown.wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds()) yield shakedown.wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds()) common.clean_up_marathon() print("exiting wait_for_marathon_and_cleanup fixture")
def parent_group(request): """ Fixture which yields a temporary marathon parent group can be used to place apps/pods within the test function. Parent group will be removed after the test. Group name is equal to the test function name with underscores replaced by dashes. """ group = '/{}'.format(request.function.__name__).replace('_', '-') yield group common.clean_up_marathon(parent_group=group)
def setup_module(module): # When the cluster is starting, it might happen that there is some delay in: # - marathon leader registration with mesos # - admin router refreshing cache (every 30s) # We should not start our tests before marathon is accessible through service endpoint. wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds(), path="ping") common.cluster_info() common.clean_up_marathon()
def wait_for_marathon_and_cleanup(): wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds(), path="ping") yield wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds(), path="ping") common.clean_up_marathon()
def wait_for_marathon_user_and_cleanup(): wait_for_service_endpoint('marathon-user', timedelta(minutes=5).total_seconds(), path="ping") with marathon_on_marathon() as client: yield wait_for_service_endpoint('marathon-user', timedelta(minutes=5).total_seconds(), path="ping") common.clean_up_marathon(client)
def wait_for_marathon_user_and_cleanup(): common.wait_for_service_endpoint('marathon-user', timedelta(minutes=5).total_seconds(), path="ping") with shakedown.marathon_on_marathon(): yield common.wait_for_service_endpoint('marathon-user', timedelta(minutes=5).total_seconds(), path="ping") common.clean_up_marathon()
def teardown_module(module): with shakedown.marathon_on_marathon(): try: common.clean_up_marathon() except: pass shakedown.uninstall_package_and_wait('marathon') shakedown.delete_zk_node('universe/marathon-user') # Remove everything from root marathon common.clean_up_marathon()
def teardown_module(module): with shakedown.marathon_on_marathon(): try: common.clean_up_marathon() except Exception: pass shakedown.uninstall_package_and_wait('marathon') shakedown.delete_zk_node('universe/marathon-user') # Remove everything from root marathon common.clean_up_marathon()
def teardown_module(module): with marathon_on_marathon() as client: try: common.clean_up_marathon(client=client) except Exception: pass uninstall_package_and_wait('marathon') delete_zk_node('universe/marathon-user') # Remove everything from root marathon common.clean_up_marathon()
def teardown_module(module): common.clean_up_marathon()
def setup_module(module): common.cluster_info() common.clean_up_marathon()
def setup_module(module): common.ensure_mom() common.cluster_info() with shakedown.marathon_on_marathon(): common.clean_up_marathon()
def setup_module(module): common.ensure_mom() common.cluster_info() with marathon_on_marathon() as client: common.clean_up_marathon(client=client)