In the test modules when you debug you will notice that accounts are
created once per module in setUpClass() all resources created within
it and tearDownClass() destroys the account initiating cleanup. All
the resources are appended to a cleanup [] list and deleted in
appropriate order at the end of the test module in tearDownClass()

There are a few reasons for doing this for all the tests in the class
at once as opposed to doing it for every test.

Modules are grouped by feature eg: test_tags does tags related
tests. And more often than not all tests in the module share similar
patterns in the set of API calls made to achieve a test scenario.

If an account was created per test the overhead of cleaning up is much
higher than when cleaning up once per module. Because every new
account needs a new VR for the first VM deployed in it. And almost
every test will deploy a VM. So this slows down test run significantly
and eats up resources like VLANs very quickly which are needed for
every account.

I saw a few fixes that moved the resource cleanup from tearDownClass()
to tearDown and that prompted me to send this email. Hope this makes
sense. I'd like to hear other's thoughts on how best to accomplish all
the tests in the most optimum way without hurting resources on a
deployment.

Also - on the test infrastructure on jenkins.buildacloud.org there is
no way to timeout a specific test if it takes up more time than
necessary. So I'm going to introduce a timeout plugin in nose that
will abort the test if it takes longer than 1/2hr. I think this should
help weeding out test that do arbitrary 'sleeps' or wait for very long
cleanup operations. That way we should be able to optimize the test as
well

Thoughts?

-- 
Prasanna.,

------------------------
Powered by BigRock.com

Reply via email to