Skip to content

Commit bdfab88

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Add more retries to TestMigrateFromDownHost tests"
2 parents a359753 + 058d137 commit bdfab88

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

nova/tests/functional/regressions/test_bug_1938326.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,16 @@ def test_migrate_from_forced_down_host(self):
7272
source_compute_id = self.api.get_services(
7373
host='src', binary='nova-compute')[0]['id']
7474
self.api.put_service(source_compute_id, {'forced_down': 'true'})
75+
# NOTE(gibi): extra retries are needed as the default 10 retries with
76+
# 0.5 second sleep is close to the 6 seconds down timeout
7577
self._wait_for_service_parameter(
7678
'src', 'nova-compute',
7779
{
7880
'forced_down': True,
7981
'state': 'down',
8082
'status': 'enabled'
81-
}
83+
},
84+
max_retries=20,
8285
)
8386

8487
# Assert that we cannot migrate from a forced down compute
@@ -94,12 +97,15 @@ def test_migrate_from_down_host(self):
9497

9598
# Stop the compute service and wait until it's down
9699
self.computes['src'].stop()
100+
# NOTE(gibi): extra retries are needed as the default 10 retries with
101+
# 0.5 second sleep is close to the 6 seconds down timeout
97102
self._wait_for_service_parameter(
98103
'src', 'nova-compute',
99104
{
100105
'state': 'down',
101106
'status': 'enabled'
102-
}
107+
},
108+
max_retries=20,
103109
)
104110

105111
# Assert that requests to migrate from down computes are rejected
@@ -123,8 +129,10 @@ def test_migrate_from_disabled_down_host(self):
123129

124130
# Stop the compute service and wait until it's down
125131
self.computes['src'].stop()
132+
# NOTE(gibi): extra retries are needed as the default 10 retries with
133+
# 0.5 second sleep is close to the 6 seconds down timeout
126134
self._wait_for_service_parameter(
127-
'src', 'nova-compute', {'state': 'down'})
135+
'src', 'nova-compute', {'state': 'down'}, max_retries=20)
128136

129137
ex = self.assertRaises(
130138
client.OpenStackApiException, self.api.post_server_action,

0 commit comments

Comments
 (0)