Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize DatabaseTestCase so travis build will be faster #6331

Merged
merged 7 commits into from
Oct 2, 2014

Conversation

diosmosis
Copy link
Member

I modified DatabaseTestCase to setup the database once per test case (in setUpBeforeClass) as is done with IntegrationTestCase. This decreases the build time for Integration tests for about 25 mins to 15mins.

@mattab Please review.

@@ -525,11 +525,19 @@ protected static function getDbTablesWithData()
*/
protected static function restoreDbTables($tables)
{
$tablesPrefix = Config::getInstance()->database_tests['tables_prefix'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic should be moved to truncateAllTables() since this function was only meant to be used here and is not used in other places

diosmosis pushed a commit that referenced this pull request Oct 2, 2014
Optimize DatabaseTestCase by creating DB and tables only once (like IntegrationTestCase) so travis build will be faster.
@diosmosis diosmosis merged commit dd4253f into master Oct 2, 2014
@diosmosis diosmosis deleted the db_test_case_optimize branch October 2, 2014 03:15
@mattab mattab added the c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. label Oct 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants