Commit graph

23 commits

Author SHA1 Message Date
addshore
1c65dd29a3 Add tablesUsed to RevisionStoreDbTest
Bug: T183777
Change-Id: Ie8bc2a9aca341a44c22828c9e9c3a7f89c7f87cd
2018-02-02 19:37:44 +00:00
addshore
4b928c87dc Extra tests for SqlBlobStore with 'windows-1252' legacy encoding
Bug: T184749
Change-Id: Ida717dbe6ae742b3b61f0f09dc60712307c53a96
2018-01-24 22:08:46 +00:00
Aaron Schulz
14ee3f2107 rdbms: specify DB name and table prefix even for the local domain
When LoadBalancer opens new local domain connections, it currently
assumes that the domain specified by the server info array is the
same. For sanity, make sure that the handle is set to the local
domain.

The main LBFactory/LoadBalancer use $wgDBname/$wgDBprefix as the
local domain, corresponding with wfWikiId(). This relation is set
automatically in MWLBFactory. If $wgLBFactoryConf/$wgDBservers is
manually configured in a way breaking this correspondance, then it
is misconfigured.

Fixes made to avoid test failure:
* Make sure LoadBalancer::setDomainPrefix() updates the local
  domain alias member. Also do not bother changing the domain of
  foreign connections.
* Use the right domain ID for the connection array key names in
  LoadBalancer::openForeignConnection().
* Now that JobQueueTest no longer mistakenly uses the non-test
  tables, force it to use the main DB_MASTER handle so that it can
  see the unit test tables even if they are TEMPORARY; such tables
  are tied to the TCP connection, so separate handles see different
  temporary tables.

Change-Id: I56f8b32fe957f984b8c9753e6db3b20abe96b038
2018-01-16 17:06:52 +00:00
daniel
0205d43803 Add tests for legacy encoding when constructing RevisionRecords
Change-Id: I49265a394b0780a48fecbf037477d2bb39195e89
2018-01-12 14:59:52 +00:00
addshore
90ca759f15 RevisionStore, fix loadSlotContent with no $blobFlags
This includes tests that were previously created in:
I6dcfc0497bfce6605fa5517c9f91faf7131f4334

Bug: T184749
Change-Id: Ieb02ac593fc6b42af1692d03d9d578a76417eb54
2018-01-12 14:48:07 +00:00
addshore
47cbdfa7fa RevisionStore tests for current behaviour of getTitle
Change-Id: I6e345b10abb81f6eae94ab9475563f690aaee012
2018-01-11 17:09:36 +00:00
jenkins-bot
d1a1d04fc8 Merge "Fix BlobStoreFactoryTest @covers tag" 2018-01-08 13:29:03 +00:00
daniel
6d52a7241a [MCR] Improve documentation and method naming on Revision and RevisionStore.
Change-Id: I3b049acff9313814a4ac448289d1aef88cb7f9df
2018-01-08 12:50:10 +00:00
addshore
4f472847bc Fix BlobStoreFactoryTest @covers tag
Change-Id: I6d61d128de3fc63d88c7767f90350f3edbfc447c
2018-01-08 12:03:35 +00:00
addshore
afe3d071a9 [MCR] fix RevisionStore::checkDatabaseWikiId for DB names with dashes.
This is a quick hack, for a proper solution see I6a98684af1d7

Bug: T183914
Change-Id: I45a151a332145438c484e02bbe96cd85dd602b9e
2018-01-04 17:18:41 +00:00
Reedy
2c1c823870 Append leading \ to BlobStoreFactoryTest covers
Change-Id: I9b85aa9808c40aa728c6ef186c50bc8cdda08bc6
2017-12-30 05:02:03 +00:00
Kunal Mehta
54640d4d4e Add @covers tags for RevisionStoreDbTest
Change-Id: Ie7ce23d5ad67816c1ae8c2c838f8263fca17b4f8
2017-12-27 17:43:50 +00:00
jenkins-bot
073fd06f15 Merge "[MCR] Introduce BlobStoreFactory" 2017-12-24 23:39:58 +00:00
addshore
e51f95dea3 [MCR] Introduce BlobStoreFactory
This allows Revision::getRevisionText to get
a different BlobStore instance when $wiki is passed in
restoring the behaviour for $wiki before the MCR Revision
overhaul patch was merged.
Ia4c20a91e98df0b9b14b138eb4825c55e5200384

Bug: T183634
Bug: T183631
bug: T183583
Change-Id: Ib0949454e9a003c2965adc1aab38e31fcf121afe
2017-12-24 23:22:30 +00:00
jenkins-bot
51615ecf47 Merge "Set wgCommentTableSchemaMigrationStage in RevisionStoreTest" 2017-12-23 12:08:42 +00:00
addshore
d4717253b2 Remove empty RevisionRecordTest
Bug: T183219
Change-Id: Ic58308da4a54186995a2d985b40e0bbf86b8cef3
2017-12-19 17:50:03 +00:00
jenkins-bot
86719704b8 Merge "SqlBlobStoreTest: Use utf-8 as name in iconv" 2017-12-15 22:04:24 +00:00
Umherirrender
78dd15c08d Set wgCommentTableSchemaMigrationStage in RevisionStoreTest
Change-Id: I2d8bfdee0a30a54f4315c8056b7ac84f47254db2
2017-12-15 21:44:27 +01:00
Umherirrender
84b9564e50 SqlBlobStoreTest: Use utf-8 as name in iconv
utf8 is an alias that doesn't work with all PHP installations.

Change-Id: I6ce9c5b4ece1a8c263afb1d4895dacd3c790a51a
2017-12-15 19:56:48 +01:00
mainframe98
70e92cdad5 Fix additional usage of incorrect case
Courtesy of the PhpStorm inspection Case mismatch in method call or
class usage.

Bug: T166759
Change-Id: I27c53658b99048fa0dd8f9d6ef1398620386e1cc
2017-12-15 11:58:11 +01:00
Kunal Mehta
471ec51c93 Fix @covers tags to use absolute class names in Storage tests
PHPUnit doesn't support use statements when evaluating @covers tags.

Change-Id: I7f649afd3e417a6b71b2f61c6ff59be5f404be8f
2017-12-14 19:20:51 -08:00
addshore
06127159e8 [MCR] Tests for RevisionStore & Related classes
Code introduced in:
I140f43a6fb443b38483f41f268c906b9cea64cf7

Change-Id: Iefad870baf2d16f12e9901b303246c64d6431ca6
2017-12-14 13:44:55 +00:00
daniel
e61a1caadd [MCR] Break Revision into RevisionRecord and RevisionStore
Bug: T174025
Change-Id: I140f43a6fb443b38483f41f268c906b9cea64cf7
2017-12-13 22:34:29 +00:00