From 19745d7cb1b30120469be1f34deda25b54a4b52f Mon Sep 17 00:00:00 2001 From: Yun Mao Date: Sun, 18 Nov 2012 15:54:46 -0500 Subject: Set node_availability_zone in XenAPIAggregateTestCase In XenAPIAggregateTestCase some service records are directly injected to the db for testing with customized AZ values . The AZ doesn't match the default availability zone setting (nova), and may or may not be overwritten during heart beat message update. It is mostly ignored but sometimes make the test_remove_host_from_aggregate_error() test fail, as discovered in the servicegroup test. Set the AZ explicitly to get rid of the non-determinism. Change-Id: I2ded5314480b2b7eb2254a58e3eb7ca9e3f8b32d --- nova/tests/test_xenapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 50ed9cd2a..276a9f071 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -2076,7 +2076,8 @@ class XenAPIAggregateTestCase(stubs.XenAPITestBase): firewall_driver='nova.virt.xenapi.firewall.' 'Dom0IptablesFirewallDriver', host='host', - compute_driver='xenapi.XenAPIDriver') + compute_driver='xenapi.XenAPIDriver', + node_availability_zone='avail_zone1') host_ref = xenapi_fake.get_all('host')[0] stubs.stubout_session(self.stubs, stubs.FakeSessionForVMTests) self.context = context.get_admin_context() -- cgit