dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17ec5d1
)
Make teardownTestDB() close any dangling connections before changing the prefix
author
Aaron Schulz
<aschulz@wikimedia.org>
Fri, 5 Apr 2019 19:36:34 +0000
(12:36 -0700)
committer
Krinkle
<krinklemail@gmail.com>
Fri, 5 Apr 2019 19:52:40 +0000
(19:52 +0000)
Bug: T219673
Change-Id: I028fc16b874cac744f7215601eec754a76f31a3f
tests/phpunit/MediaWikiTestCase.php
patch
|
blob
|
history
diff --git
a/tests/phpunit/MediaWikiTestCase.php
b/tests/phpunit/MediaWikiTestCase.php
index
f43f0a9
..
5119d73
100644
(file)
--- a/
tests/phpunit/MediaWikiTestCase.php
+++ b/
tests/phpunit/MediaWikiTestCase.php
@@
-1364,6
+1364,9
@@
abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
JobQueueGroup::singleton()->get( $type )->delete();
}
+ // T219673: close any connections from code that failed to call reuseConnection()
+ // or is still holding onto a DBConnRef instance (e.g. in a singleton).
+ MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->closeAll();
CloneDatabase::changePrefix( self::$oldTablePrefix );
self::$oldTablePrefix = false;