From 61d3013c8bd768aee89df11d776fab660124e10c Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 6 Apr 2012 20:36:18 +0200 Subject: [PATCH] MDL-32323 fix concurrent run collision caused by setup reset --- lib/phpunit/bootstrap.php | 3 --- lib/setup.php | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/phpunit/bootstrap.php b/lib/phpunit/bootstrap.php index dc806b2f699..b9547ef0dd7 100644 --- a/lib/phpunit/bootstrap.php +++ b/lib/phpunit/bootstrap.php @@ -196,9 +196,6 @@ 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) { diff --git a/lib/setup.php b/lib/setup.php index e2fa819eb10..c2bbb5aa0f6 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -463,8 +463,10 @@ setup_validate_php_configuration(); // Connect to the database setup_DB(); -// reset DB tables if (PHPUNIT_TEST and !PHPUNIT_UTIL) { + // make sure tests do not run in parallel + phpunit_util::acquire_test_lock(); + // reset DB tables phpunit_util::reset_database(); }