Commit graph

869 commits

Author SHA1 Message Date
Aaron
957f09b8a4 [FileBackend] Added doQuickOperations() function for things like purging thumbnails.
* doQuickOperations() lets us do things like purge thumbnails as fast as possible.
  Stat calls, SHA1 checks, and RTTs in general are avoided. It also avoids the
  slowness of lazy population of thumbnail SHA1s in Swift (for those made by rewrite.py).
* Removed supportedOperations() to avoid the extra complexity.
* Made a few variable type and exception documentation cleanups.
* Cleaned up unit test file removal a bit and made some functions private.

Change-Id: I6922368c6af7752a6927d96402519132203108a1
2012-05-16 10:30:34 -07:00
Reedy
df7b1cc716 Merge "[IP] Added an IP::prettifyIP() function for displaying IPs." 2012-05-15 19:10:51 +00:00
Tim Starling
6e49b1a966 Merge "[FileBackend] Added support for concurrent file write operations." 2012-05-14 07:23:29 +00:00
Aaron Schulz
8c8b289955 Merge "Introducing LinksUpdateTest." 2012-05-13 17:24:34 +00:00
daniel
50ee1d23e5 Introducing LinksUpdateTest.
This test case is intended to test the updating of various links
tables using a LinksUpdate object, based on the information in
a ParserOutput object.

Patch set 3: Suggestions by Aaron:
             factored assertSelect() out into MediaWikiTestCase.
             Force sorting of result set under testing.

Change-Id: I2d01e67ee7396080a04e5dff637aca0dc159c65d
2012-05-13 17:07:10 +02:00
Reedy
c68ca4228e Merge "Integrating mobile device detection class into MW core" 2012-05-11 22:50:35 +00:00
Aaron
456177bdee [IP] Added an IP::prettifyIP() function for displaying IPs.
Change-Id: I53b3fe70bd0091ef02740f2b8950c36a0e4cf32e
2012-05-11 10:53:14 -07:00
umherirrender
e9fa97f76e Add unit test for MWNamespace::isNonincludable
rename MWNamespace::isNonincludableNamespace
to MWNamespace::isNonincludable, because "Namespace" is already in the
class name

Change-Id: Ie982835c7dc84cb10c823996e5360cc1b342f704
2012-05-11 19:52:34 +02:00
awjrichards
8653accc60 Integrating mobile device detection class into MW core
Change-Id: Ic7bbeba746ea37a92c1df5dbaa1fb4fd08da130c
2012-05-09 14:28:16 -07:00
Aaron
23a0490b78 [FileBackend] Added support for concurrent file write operations.
* FS backends work via popen() and basic shell commands.
* Swift backends use the custom SwiftCloudFiles async features.
* Refactored storagePathsRead()/storagePathsChanged() to normalize the paths
  for correct dependency detection in FileOpBatch.
* Cleaned up SwiftFileBackend exception handling to make debugging easier.
* Added a quick and dirty performance testing script.
* Updated unit tests to include a run with parallelize=implicit.
* Improved file test failure output a bit.

Change-Id: I6a5ed743c30c598e0dd7301dbdb3631c460332fd
2012-05-09 05:37:41 -07:00
Aaron Schulz
a9e028e5a8 [FileBackend] File locking fixes.
* Fixed unlocking logic in FSLockManager for case when an EX lock was made, then an SH one, and then the EX one was "unlocked"
* Avoid hiding useful unlink() warnings in FSLockManager
* Reduced locking use in test cleanup code
* Added a simple testLockCalls() test function
* Made a few cleanups & fixes to backend tests

Change-Id: I1110d9b537c450d9feca5a2fb35519c22435e81d
2012-05-08 01:51:57 -07:00
Aaron Schulz
4e5ce55027 Merge "Let tablesUsed imply needsDB in MediaWikiTestCase." 2012-05-07 22:59:22 +00:00
Aaron Schulz
bc2b3e055c Merge "Adding $this->tablesUsed to RevisionStorageTest." 2012-05-07 22:53:13 +00:00
daniel
479711159c Adding test case for basic WikiPage functionality, including database interaction.
New tests are added to avoid regressions when the ContentHandler facility
is introduced.

Changeset 3: use tablesUsed to allow database cleanup after test, as per
             Aaron's suggestion.

Changeset 4: use array_merge instead of +=.

Changeset 5: trying dumber rollback test to see of jenkins likes it better.

Change-Id: I0a9f8dfd30031baa4b12cc128a39059868149884
2012-05-07 14:57:30 -07:00
daniel
650e33efa4 Let tablesUsed imply needsDB in MediaWikiTestCase.
If the test says it uses database tables, then it needs the database.

And while we are at it, make the check for the test group declaration
more lenient.

Patch set 2: tweaked according to demon's comments.

Change-Id: Ib123745d45b85cebeab5ec87ea7d8227ec3d1dea
2012-05-07 14:56:33 -07:00
daniel
9b98d16996 Adding $this->tablesUsed to RevisionStorageTest.
This is a follow-up to I6934d03e (no 6414).

Declare tables in $this->tablesUsed to allow for database clenaup,
as Aaron suggested.

Change-Id: Iac05b0428b335879729f6d3b993eac0d3151429c
2012-05-07 14:46:25 -07:00
Hashar
4d6e05cad6 Merge "Adding tests for dumps" 2012-05-07 16:39:14 +00:00
Werdna
a97f5a1134 Merge "(bug 18195) Allow changing preferences via API" 2012-05-04 05:53:06 +00:00
Aaron Schulz
56c13312da Merge "Adding test case for testing revision storage and retrieval." 2012-05-03 22:39:14 +00:00
Hashar
65e0ff6bb8 Merge "Adding more tests for Title." 2012-05-03 11:40:50 +00:00
Hashar
5343b3eb3e Merge "Bumping minimum supported version of PHPUnit to 3.6.7" 2012-05-02 20:13:40 +00:00
daniel
0b5f8c4cd0 Adding test case for testing revision storage and retrieval.
New tests are added to avoid regressions when the ContentHandler facility is introduced.

Change-Id: I6934d03e9df74930998d771f64fe4f4fe5555967
2012-05-02 19:34:35 +02:00
daniel
d85bbb1074 Adding more tests for Title.
This introduces tests for isCssJsSubpage, isCssOrJsPage, and isWikitextPage.

New tests are added to avoid regressions when the ContentHandler facility is introduced.

Change-Id: I68987490b01242cc0bcdc0d9dfaa99f1227f71a0
2012-05-02 19:32:56 +02:00
Aaron Schulz
f4ead22497 Merge "enable email for PreferencesTest.php" 2012-05-01 23:04:53 +00:00
umherirrender
bd27932f55 Set CdbTest to skipped instead of incomplete
When the native support is not available, the test is not incomplete.
See also the DiffBlob test and xdiff.

Change-Id: I16c14efc3f24e4171a699390d99ca6509d6a28c8
2012-04-30 09:49:31 +02:00
umherirrender
3098babc35 enable email for PreferencesTest.php
The tests in PreferencesTest.php checking email things,
enable email to let the test run complete and not depend on the wiki
setting.

Change-Id: I21b34b31c52a10e0f4f6b918ee25d98a97ea5981
2012-04-30 09:29:45 +02:00
Christian Aistleitner
096592cf14 Bumping minimum supported version of PHPUnit to 3.6.7
With PHPUnit 3.6.7, we can finally check the output of tests.

Change-Id: Ib0f1afe5fd9ab9784ba7f78b2921cf047ccc83f3
2012-04-29 10:02:23 +02:00
Platonides
fdc857b73e Change CRLF line ending in GenderCacheTest.php
Edited in windows with no autocrlf set?

Change-Id: I955f0ed1fad9c4e5c143324b163a4b3c81a3f733
2012-04-28 17:18:22 +02:00
Platonides
1ceb4b671f Really use the global variable. Fixes bug in c4507 (4989dd)
Change-Id: I4733a3d8949d76044ba90e672395299f6623cecf
2012-04-28 17:12:38 +02:00
Christian Aistleitner
76cefaf165 Adding tests for dumps
Change-Id: I9aa3b6d7349458b3e2b2c7111bda739bacc22f9f
2012-04-28 11:37:07 +02:00
Demon
799a29a209 Merge changes Ib2cb36cd,I50dec908
* changes:
  Adding Maintenance output tests
  fwriting to STDOUT -> print in Maintenance
2012-04-27 18:36:05 +00:00
Brion VIBBER
e8eddd20de Merge "[FileBackend] Added 'recursive' flag to directory clean() function." 2012-04-26 23:30:05 +00:00
Brion VIBBER
ece03cc143 Merge "strip off subpages direct in GenderCache" 2012-04-26 23:21:43 +00:00
Aaron
104e8bb0d7 [FileBackend] Added 'recursive' flag to directory clean() function.
Change-Id: I8fadd25c05840e2324bf8433dc0a4846daf8e2c3
2012-04-26 12:41:33 -07:00
Demon
490b85f27b Merge "let us easily override PHPUnit version" 2012-04-26 13:22:17 +00:00
Brion VIBBER
f2e06b1f04 Merge "[FileBackend] Added some basic directory functions." 2012-04-25 19:38:12 +00:00
Aaron Schulz
dd5326ccf1 [FileBackend] Added some basic directory functions.
* Added directoryExists() function to check if a dir exists.
* Added getDirectoryList() and getTopDirectoryList() functions to list out subdirs.
* Added getTopFileList() function to list out immediate files in a dir. This wraps getFileList(), which was modified.

Change-Id: I087835f40d76c41f5d6af55b9a34a51e0f44a675
2012-04-21 21:33:41 -07:00
Brion VIBBER
634bf17c9e Merge "Revert "tests to compare En, Qqq and messages.inc" due to test failures caused by extension dependencies." 2012-04-21 19:39:59 +00:00
umherirrender
4989ddd423 strip off subpages direct in GenderCache
LinkBatch can also give subpages to the GenderCache and therefor it is
easier to do it always in GenderCache, than in LinkBatch and Title

Add unit tests for GenderCache

Change-Id: Ia936ff8bb639a197b0b3a8e07c97a66edd57dd10
2012-04-21 10:34:22 +02:00
Aaron Schulz
e515d15f3a Revert "tests to compare En, Qqq and messages.inc" due to test failures caused by extension dependencies.
This reverts commit 9a2aae3107
2012-04-20 21:12:08 +00:00
Brion VIBBER
242659a4a7 Merge "Increase permitted runtime for testParserTest" 2012-04-20 18:03:20 +00:00
Christian Aistleitner
cc13cf0564 Increase permitted runtime for testParserTest
Change-Id: Id8a73b2d5d32af38c6856c3120394a2d6150f835
2012-04-20 20:00:36 +02:00
Antoine Musso
9a2aae3107 tests to compare En, Qqq and messages.inc
Change-Id: I7ebeeea703e955c628b57548eb023fa3eb5a2f52
2012-04-20 18:08:33 +02:00
Szymon Świerkosz
a6cd69d83a (bug 18195) Allow changing preferences via API
I have created an API module for changing the preferences.
It allows resetting preferences (reset argument) and bulk changes
of preferences (change argument) in a format:
name1=value1|name2=value2

The change argument has a limitation imposed by the current API
implementation as it cannot accept | in values. There is
available a pair of arguments optionname and optionvalue, the
latter accepts values with |.

I have created optionstoken parameter in meta=userinfo to provide
a token. There is already preferencestoken there, but I would
like to have a consistent naming.

Change-Id: I0d6c654a7354ba77e65e338423952a6a78c1150f
2012-04-20 16:56:27 +10:00
Brion VIBBER
01c99c8541 Merge "assertEquals is $expected, $actual, not $actual, $expected" 2012-04-18 23:06:24 +00:00
Reedy
9e33a6c740 assertEquals is $expected, $actual, not $actual, $expected
Fix Title related tests that are the wrong way round (noticed by Daniel Kinzler
when creating more tests, and wondering why phpunit was making error messages
that didn't make any sense!)

public static function assertEquals($expected, $actual, $message = '',
    $delta = 0, $maxDepth = 10, $canonicalize = FALSE, $ignoreCase = FALSE)

Change-Id: I09aeb7cb7edb8e486ccf2f54673f91cd9704cd3b
2012-04-18 16:03:46 -07:00
Reedy
bcafe7b005 Merge "duration formatter, makes time in sec easy to read" 2012-04-18 15:56:30 +00:00
Aaron
41831cbcfe Fixed silly backend test config bug.
Change-Id: I35b53dc609acb720c64f236cb58f91a73604e2f8
2012-04-17 10:25:52 -07:00
Antoine Musso
3b9a3678b3 let us easily override PHPUnit version
The new --with-phpunitdir let us specify a git checkout of PHPUnit. That
will ease regression testing of the upstream new version. Usage is
straightforward:

Checkout PHPUnit from git as instructed on:
https://github.com/sebastianbergmann/phpunit#readme

Invoke our test suite with:
 $ cd maintenance/tests
 $ php phpunit.php --with-phpunitdir /path/you/just/checked/out

Change-Id: I8a9af0deac4dd74e3c8bde73535555c54ac83766
2012-04-17 15:39:15 +02:00
Christian Aistleitner
89743db168 Adding Maintenance output tests
Change-Id: Ib2cb36cd840505e2956a6b0978cea1920277d42c
2012-04-15 21:29:07 +02:00