wiki.techinc.nl/tests/phpunit/includes/db
Aaron Schulz 5bfa77f8d9 rdbms: enforce and improve LBFactory/LoadBalancer callback handling
* Handle the case where an onTransaction* callback for one handle
  adds more onTransaction* callbacks to a different handle. Instead
  of supporting only a short chain of such callbacks, try to resolve
  the whole chain by using a loop in LoadBalancer and LBFactory.
* Add sanity checks to enforce the proper call order of LoadBalancer
  transaction methods, such as those that execute callbacks. This is
  the order that LBFactory already uses. Use ROUND_ERROR for problems
  that can ruin the instance state. Such problems require rollback.
* Correct setTrxEndCallbackSuppression() calls in beginMasterChanges()
  that were making tests fail.
* Make Database handle callback suppression for FLUSHING_ALL_PEERS
  instead of making LoadBalancer/LBFactory have to manage it.
* Simplify finalizeMasterChanges() given that suppression does not
  actually effect runOnTransactionPreCommitCallbacks().
* Make dangling callback warning in Database::close work properly.
* Actually use $fname in flushReplicaSnapshots().
* Use DBTransactionError instead of DBExpectedError in some places
  where stages fail.
* Fix failing testGetScopedLock() unit tests so everything passes.

Add more comments to setTransactionListener and onTransactionIdle.

Change-Id: I6a25a6e4e5ba666e0da065a24846cbab7e786c7b
2018-04-30 21:55:25 +00:00
..
DatabaseOracleTest.php tests: Enable PHPUnit 4/6 compat layer in some tests that need it 2018-04-07 19:31:24 -07:00
DatabasePostgresTest.php rdbms: Remove support for PostgreSQL < 9.2, and improve INSERT IGNORE for 9.5 2018-04-05 20:52:46 +00:00
DatabaseSqliteTest.php rdbms: make LoadBalancer::getConnection() ignore CONN_TRX_AUTO when unusable 2018-03-02 18:40:39 +00:00
DatabaseTestHelper.php rdbms: Issue a deprecation warning if errors are ignored 2018-04-10 02:06:44 +00:00
LBFactoryTest.php Reset table sequences and skip some test assertions for sqlite 2018-04-13 10:36:08 +00:00
LoadBalancerTest.php rdbms: enforce and improve LBFactory/LoadBalancer callback handling 2018-04-30 21:55:25 +00:00