Split large-ops into three tests so each has its own timeout

In the gate OS_TEST_TIMEOUT is 500 seconds, which is a per test timeout.
large-ops is run one test three times, so split it out to three tests so
each has its own OS_TEST_TIMEOUT.

This works because the cleanup of resources is done in tearDownClass and
tests inside a class are run serially (although order cannot be guaranteed).

Note: the image will be re-created for each test and destroyed on
tearDown from each test.

Change-Id: Iefa6f0fec9b3eea587b1437b47cce81e1a9c242c
This commit is contained in:
Joe Gordon 2014-05-09 13:30:40 -07:00
parent d222c9ba8b
commit b7f37cc79e
1 changed files with 13 additions and 4 deletions

View File

@ -63,11 +63,20 @@ class TestLargeOpsScenario(manager.NetworkScenarioTest):
self.set_resource(server.name, server)
self._wait_for_server_status('ACTIVE')
@test.services('compute', 'image')
def test_large_ops_scenario(self):
def _large_ops_scenario(self):
if CONF.scenario.large_ops_number < 1:
return
self.glance_image_create()
self.nova_boot()
self.nova_boot()
self.nova_boot()
@test.services('compute', 'image')
def test_large_ops_scenario_1(self):
self._large_ops_scenario()
@test.services('compute', 'image')
def test_large_ops_scenario_2(self):
self._large_ops_scenario()
@test.services('compute', 'image')
def test_large_ops_scenario_3(self):
self._large_ops_scenario()