It appears that --reuse-db parameter of phpunit.php is broken now.
Its usecase was:
- first, you run one small test with --use-normal-tables. This causes all unittest_ tables to be created by cloning (possibly slow).
- then you run all other tests with --use-normal-tables --reuse-db, thus bypassing the need to copy tables (which is what CloneDatabase does). Skipping the clone greatly improves performance.
The cause is: recently the following line was added to tests/phpunit/MediaWikiIntegrationTestCase.php:
self::$dbClone->destroy( true );
This true results in all tables created by phpunit (even when --use-normal-tables are used) to be unconditionally deleted (there is no way to disable it). This makes --reuse-db impossible.
There is another impact: --use-normal-tables was very useful for manual troubleshooting (you could inspect the state of database after a failed test). Now that the table is always deleted, this is also not possible.