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

DBAL-1123 Initialize database schema only once per PHPUnit run #779

Merged
merged 1 commit into from
Jan 18, 2015

Conversation

deeky666
Copy link
Member

Currently the PHPUnit test suite recreates the database schema on each invocation of TestUtil::getConnection() which is highly inefficient and costly concerning performance, especially on platforms where schema recreation consumes a lot of time.
With this patch the database schema is initilaized once per PHPUnit run, increasing overall test suite runtime significantly.
For example using SQL Anywhere, database creation takes about 4-5 seconds which results in a complete test suite runtime of several minutes. With this patch the complete test suite runs in about 12-15 seconds !.

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-1123

We use Jira to track the state of pull requests and the versions they got
included in.

@deeky666 deeky666 changed the title Initialize database schema only once per PHPUnit run [DBAL-1123] Initialize database schema only once per PHPUnit run Jan 18, 2015
Ocramius added a commit that referenced this pull request Jan 18, 2015
[DBAL-1123] Initialize database schema only once per PHPUnit run
@Ocramius Ocramius merged commit 170817a into doctrine:master Jan 18, 2015
@Ocramius
Copy link
Member

Thanks @deeky666 !

@deeky666 deeky666 deleted the improve-testsuite-performance branch July 7, 2016 07:28
@Ocramius Ocramius added this to the 2.6 milestone Jul 22, 2017
@Ocramius Ocramius changed the title [DBAL-1123] Initialize database schema only once per PHPUnit run DBAL-1123 Initialize database schema only once per PHPUnit run Jul 22, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants