def verify_context_broker_is_installed_successfully(context):
    """
    verify contextBroker is started successfully
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying if contextBroker is started successfully...")
    cb = CB(protocol=props_cb["CB_PROTOCOL"],
            host=props_cb["CB_HOST"],
            port=props_cb["CB_PORT"])
    c = 0
    while (not cb.is_cb_started()) and (int(props_cb["CB_RETRIES"]) > c):
        time.sleep(int(props_cb["CB_DELAY_TO_RETRY"]))
        c += 1
        __logger__.debug(
            "WARN - Retry in verification if context broker is started. No: (%s)"
            % str(c))
    assert (
        props_cb["CB_RETRIES"]
    ) > c, "ERROR - context Broker is not started after of %s verification retries" % str(
        c)
    if props_cb["CB_VERIFY_VERSION"].lower() == "true":
        context.execute_steps(u'Given send a version request')
        context.execute_steps(u'Given verify if version is the expected')
    else:
        __logger__.info("Current version is not verified...")
    __logger__.info("...Verified that contextBroker is started successfully")
def verify_context_broker_is_installed_successfully(context):
    """
    verify contextBroker is started successfully
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Verifying if contextBroker is started successfully...")
    cb = CB(protocol=props_cb["CB_PROTOCOL"], host=props_cb["CB_HOST"], port=props_cb["CB_PORT"])
    c = 0
    while (not cb.is_cb_started()) and (int(props_cb["CB_RETRIES"]) > c):
        time.sleep(int(props_cb["CB_DELAY_TO_RETRY"]))
        c += 1
        __logger__.debug("WARN - Retry in verification if context broker is started. No: (%s)" % str(c))
    assert (props_cb["CB_RETRIES"]) > c, "ERROR - context Broker is not started after of %s verification retries" % str(c)
    if props_cb["CB_VERIFY_VERSION"].lower() == "true":
        context.execute_steps(u'Given send a version request')
        context.execute_steps(u'Given verify if version is the expected')
    else:
        __logger__.info("Current version is not verified...")
    __logger__.info("...Verified that contextBroker is started successfully")