rdbms: don’t teardown in LBFactorySingle destructor

This mirrors change I61914b9866 (commit 143333b172): since this class,
like LoadBalancerSingle, gets its connection injected rather than
managing its full lifetime, it should not close the connection when it
is destroyed. Without this change, the class cannot be used in
integration test, because MediaWikiIntegrationTest is not prepared for
its $this->db being closed.

Change-Id: I6cb62cfeef299b773cf62c16aa4d3d6f0496b7fe
This commit is contained in:
Lucas Werkmeister 2020-11-25 14:09:52 +01:00
parent 9d3633cfd5
commit 5a6374471f

View file

@ -96,4 +96,8 @@ class LBFactorySingle extends LBFactory {
$callback( $this->lb, ...$params );
}
}
public function __destruct() {
// do nothing since the connection was injected
}
}