Functional tests can execute 4-5x faster (non-integration mode)

Bug #1516343 reported by Eva Balycheva on 2015-11-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Undecided
Eva Balycheva

Bug Description

Currently functional test base class "zaqar.tests.functional.base.FunctionalTestBase" is written to recreate Bootstrap object and to open/close database connections on each execution of setUp(self) method.

Functional test base class "FunctionalTestBase" can be modified to make these things reusable across all test cases of each particular subclass of it.

I tried it and it makes functional tests execution in non-integration mode up to 4-5x times faster! 20 seconds vs 5 seconds on my machine. I haven't detected any problems.
I can propose a change so you can test it yourself. If problems will be detected, we can abandon the change and mark this bug report as invalid.

Also:
Functional tests in integration mode can be accelerated too up to 7x times. On my machine it's 235 seconds vs 35 seconds.
As you may see class attribute "server" is not actually reusable. The server is terminated after each test class's test case execution:
see: https://github.com/openstack/zaqar/blob/master/zaqar/tests/functional/base.py#L91
But there's a problem. When I make it reusable, 8 tests out of 219 fail - few tests in "TestPools" and "TestHealth" classes.
These tests must be adapted to make them work with reusable "server" if we want to accelerate functional tests in integration mode.
I can open separate bug report/change for this.

Eva Balycheva (ubershy) on 2015-11-15
description: updated
Changed in zaqar:
assignee: nobody → Eva Balycheva (ubershy)
Eva Balycheva (ubershy) on 2015-11-15
summary: - Functional tests can execute 4-5x faster
+ Functional tests can execute 4-5x faster (non-integration mode)
description: updated
Eva Balycheva (ubershy) on 2015-11-15
description: updated
Eva Balycheva (ubershy) on 2015-11-15
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers