MDL-32323 prevent concurrent execution of unit tests

This commit is contained in:
Petr Skoda
2012-04-10 15:27:03 +02:00
parent 3604563c79
commit 4be2ad3660
3 changed files with 63 additions and 4 deletions
+3 -1
View File
@@ -127,7 +127,6 @@ if (!file_exists("$CFG->phpunit_dataroot/phpunittestdir.txt")) {
phpunit_bootstrap_initdataroot($CFG->phpunit_dataroot);
}
// verify db prefix
if (!isset($CFG->phpunit_prefix)) {
phpunit_bootstrap_error(131, 'Missing $CFG->phpunit_prefix in config.php, can not run tests!');
@@ -197,6 +196,9 @@ if (PHPUNIT_UTIL) {
return;
}
// make sure tests do not run in parallel
phpunit_util::acquire_test_lock();
// is database and dataroot ready for testing?
list($errorcode, $message) = phpunit_util::testing_ready_problem();
if ($errorcode) {