commit ea104e2eaf2a52ee598ee08215fddef2d3924b66
Author: Eva Balycheva <email address hidden>
Date: Sat Nov 14 00:20:14 2015 +0300
Automatically drop functional tests databases
Currently some tests leave databases after execution.
These databases consume significant amount of disk space.
And sometimes their existence causes errors (see bug description)
This patch partially solves the problem as it only affects functional
tests.
It will implement "tearDownClass(cls)" method in "FunctionalTestBase"
class which will drop databases used by functional tests and close
connections at the end of execution of each test subclass.
Class method "_pooling_drop_dbs_by_project(cls, xproject)" uses not very
straightforward way to drop databases of each pool driver, but it makes
these databases to drop even in integration mode. Please tell me if you
know a better way to do it.
Cleanups in "TestHealth" class were removed as they prevent dropping of
pool databases.
But there's performance problem.
The implementation of "tearDownClass(cls)" reopens connections to drop
databases. Opening/closing connections consumes significant time.
Same for dropping databases.
Overall this patch makes functional test execution time +50% longer.
On my machine it's: 20 seconds vs 27 seconds.
I was searching for a solution to compensate this slowdown.
Now I know super effective way to reduce functional tests execution time
to just 5 seconds. The description of this possible solution can be
found in my new bug report: https://bugs.launchpad.net/zaqar/+bug/1516343
Reviewed: https:/ /review. openstack. org/245464 /git.openstack. org/cgit/ openstack/ zaqar/commit/ ?id=ea104e2eaf2 a52ee598ee08215 fddef2d3924b66
Committed: https:/
Submitter: Jenkins
Branch: master
commit ea104e2eaf2a52e e598ee08215fdde f2d3924b66
Author: Eva Balycheva <email address hidden>
Date: Sat Nov 14 00:20:14 2015 +0300
Automatically drop functional tests databases
Currently some tests leave databases after execution.
These databases consume significant amount of disk space.
And sometimes their existence causes errors (see bug description)
This patch partially solves the problem as it only affects functional cls)" method in "FunctionalTest Base"
tests.
It will implement "tearDownClass(
class which will drop databases used by functional tests and close
connections at the end of execution of each test subclass.
Class method "_pooling_ drop_dbs_ by_project( cls, xproject)" uses not very
straightforward way to drop databases of each pool driver, but it makes
these databases to drop even in integration mode. Please tell me if you
know a better way to do it.
Cleanups in "TestHealth" class were removed as they prevent dropping of
pool databases.
But there's performance problem. cls)" reopens connections to drop
The implementation of "tearDownClass(
databases. Opening/closing connections consumes significant time.
Same for dropping databases.
Overall this patch makes functional test execution time +50% longer.
On my machine it's: 20 seconds vs 27 seconds.
I was searching for a solution to compensate this slowdown. /bugs.launchpad .net/zaqar/ +bug/1516343
Now I know super effective way to reduce functional tests execution time
to just 5 seconds. The description of this possible solution can be
found in my new bug report:
https:/
Partial-Bug: 1506091 8c75218da0cbeea 56b0830f0a8
Change-Id: Ib4addfee5feadf