Fix the slowest test
This patch is going to fix the k8s test gate for Magnum: 1. Given the test case test_create_list_sign_delete_clusters is the slowest test case, we better add the Tempest 'slow' tag for it. 2. Raise the timeout from 1800s to 3600s 3. Fix a wrong method calling Change-Id: I074434b3100178cba19b1f2f20da792871bb8530
This commit is contained in:
parent
cee6161824
commit
b473e2d498
|
@ -118,7 +118,7 @@ class ClusterClient(client.MagnumClient):
|
|||
def wait_for_created_cluster(self, cluster_id, delete_on_error=True):
|
||||
try:
|
||||
utils.wait_for_condition(
|
||||
lambda: self.does_cluster_exist(cluster_id), 10, 1800)
|
||||
lambda: self.does_cluster_exist(cluster_id), 10, 3600)
|
||||
except Exception:
|
||||
# In error state. Clean up the cluster id if desired
|
||||
self.LOG.error('Cluster %s entered an exception state.',
|
||||
|
@ -131,7 +131,7 @@ class ClusterClient(client.MagnumClient):
|
|||
|
||||
def wait_for_final_state(self, cluster_id):
|
||||
utils.wait_for_condition(
|
||||
lambda: self.is_cluster_in_final_state(cluster_id), 10, 1800)
|
||||
lambda: self.is_cluster_in_final_state(cluster_id), 10, 3600)
|
||||
|
||||
def is_cluster_in_final_state(self, cluster_id):
|
||||
try:
|
||||
|
@ -156,7 +156,7 @@ class ClusterClient(client.MagnumClient):
|
|||
self.LOG.error('Cluster %s is in fail state.',
|
||||
cluster_id)
|
||||
raise exceptions.ServerFault(
|
||||
"Got into an error condition: %s for %s",
|
||||
"Got into an error condition: %s for %s" %
|
||||
(model.status, cluster_id))
|
||||
else:
|
||||
return False
|
||||
|
|
|
@ -68,7 +68,7 @@ class ClusterTest(base.BaseTempestTest):
|
|||
|
||||
# NOTE (dimtruck) by default tempest sets timeout to 20 mins.
|
||||
# We need more time.
|
||||
test_timeout = 1800
|
||||
test_timeout = 3600
|
||||
self.useFixture(fixtures.Timeout(test_timeout, gentle=True))
|
||||
except Exception:
|
||||
self.tearDown()
|
||||
|
@ -133,6 +133,7 @@ class ClusterTest(base.BaseTempestTest):
|
|||
# (dimtruck) Combining all these tests in one because
|
||||
# they time out on the gate (2 hours not enough)
|
||||
@testtools.testcase.attr('positive')
|
||||
@testtools.testcase.attr('slow')
|
||||
def test_create_list_sign_delete_clusters(self):
|
||||
gen_model = datagen.valid_cluster_data(
|
||||
cluster_template_id=self.cluster_template.uuid, node_count=1)
|
||||
|
|
Loading…
Reference in New Issue