Comment 2 for bug 1506091

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zaqar (master)

Reviewed: https://review.openstack.org/245464
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=ea104e2eaf2a52ee598ee08215fddef2d3924b66
Submitter: Jenkins
Branch: master

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

    Partial-Bug: 1506091
    Change-Id: Ib4addfee5feadf8c75218da0cbeea56b0830f0a8