def check_cluster_active(self, cluster_id):
        timeout = TEMPEST_CONF.data_processing.cluster_timeout
        s_time = timeutils.utcnow()
        while timeout < timeutils.delta_seconds(s_time, timeutils.utcnow()):
            cluster = self.client.clusters.get(cluster_id)
            if cluster.status == CLUSTER_STATUS_ACTIVE:
                return
            if cluster.status == CLUSTER_STATUS_ERROR:
                raise exceptions.BuildErrorException(
                    'Cluster failed to build and is in %s status.' %
                    CLUSTER_STATUS_ERROR)
            time.sleep(TEMPEST_CONF.data_processing.request_timeout)
        raise exceptions.TimeoutException(
            'Cluster failed to get to %s status within %d seconds.'
            % (CLUSTER_STATUS_ACTIVE, timeout))
dataset/ETHPy150Open openstack/sahara/sahara/tests/tempest/scenario/data_processing/client_tests/base.py/BaseDataProcessingTest.check_cluster_active/swapped operands of `<`