tests: Reset Postgres sequences when cloning and truncating
authorBrad Jorsch <bjorsch@wikimedia.org>
Sun, 18 Mar 2018 17:23:58 +0000 (13:23 -0400)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 5 Apr 2018 23:57:24 +0000 (23:57 +0000)
commit501b1fb7df70503d392101737dc8a0e8a8788898
tree8bf21464b053c6ea343b3b7610c0c1e316f15260
parent43d1f706be54b916923a93512892440e014fcac0
tests: Reset Postgres sequences when cloning and truncating

This improves the repeatability of the unit tests by making the ID
values generated depend less on what previous tests might have done.

It also prevents tests from using up sequence numbers for the live DB's
tables.

Change-Id: Iaa8ae1e5cef4b9099bd1b4b8fc806f5af372a7ff
includes/libs/rdbms/database/DatabasePostgres.php
tests/phpunit/MediaWikiTestCase.php