Set "run when DBs idle" DeferredUpdates logic in Maintenance
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 1 Sep 2016 16:43:01 +0000 (09:43 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 1 Sep 2016 22:09:21 +0000 (22:09 +0000)
commit0622fbb077eba5df2bacbb24b03cf3ff7939c417
treefa6552b29c698b6aea6d392e962acf11b1680e8b
parentef1c17b77d7f8a47d3db098db3acd3f162bbdaa8
Set "run when DBs idle" DeferredUpdates logic in Maintenance

* This is a more robust version of the one inside
  DeferredUpdates (checking all DBs), which will be
  replaced in a later commit.
* Make sure the listener is restored when the LB gets
  torn down in tests. Also, it should respect the
  $wgCommandLineMode value as tests can change it.

Change-Id: I1e3faa5a058df44e2d27ab5ac185930867eb68ac
maintenance/Maintenance.php
tests/phpunit/MediaWikiTestCase.php