'Retry an Elasticsearch query every second until query success, or a defined
length of time has passed.'

def wait_until_cmd_or_err(self, es_pod, uuid, timeout_secs):

    deadline = (time.time() + timeout_secs)
    interval = 1
    while (not self.query_es_from_es(es_pod, uuid)):
        if ((time.time() + interval) > deadline):
            raise OpenShiftCheckException('NoMatchFound', 'expecting    match    in    Elasticsearch    for    message    with    uuid    {},    but    no    matches    were    found    after    {}s.'.format(uuid, timeout_secs))
        time.sleep(interval)
