Don't create replicas2 vm in zuul
Zuul is not capable of creating 3 VM due to the lack of memory. Change-Id: I180e7f8e4ab07998b3c0fc66fe2e316dd8d42aba
This commit is contained in:
parent
d63e17a1c0
commit
711b04f792
@ -112,4 +112,12 @@ DatabaseGroup = [
|
||||
'rebuild_image_id',
|
||||
help="The new guest image ID used for rebuilding database instance."
|
||||
),
|
||||
cfg.BoolOpt(
|
||||
"run_full_tests",
|
||||
default=False,
|
||||
help="Whether to run full tests for some tests. In the replication"
|
||||
"test scenario, Trove will create 3 VMs for testing, In some"
|
||||
"testing environment such as zuul, This will"
|
||||
"cause the test to failed due to the lack of memory."
|
||||
)
|
||||
]
|
||||
|
@ -99,6 +99,10 @@ class TestReplicationBase(trove_base.BaseTroveTest):
|
||||
new_db_names = [db['name'] for db in new_replica1_dbs]
|
||||
self.assertIn(db_name, new_db_names)
|
||||
|
||||
# In the zuul environment, the testing VM can not create the
|
||||
# replica2 vm due to the lack of memory.
|
||||
if not CONF.database.run_full_tests:
|
||||
return
|
||||
# Create replica2
|
||||
LOG.info(f"Creating replica2 for instance {self.instance_id}")
|
||||
name = self.get_resource_name("replica-02")
|
||||
|
Loading…
x
Reference in New Issue
Block a user