wiki.techinc.nl/tests/phpunit
Tim Starling b2a8e26cda MultiHttpClient: Reduce the default timeout from 900 to 30
Per my caller survey in the linked bug, it is hard to find a caller
which actually needs a long timeout, but many callers used the default
timeout without reviewing it. The default was increased from 300 to 900
as a quick hack to fix T226979, but that has now been fixed by overriding
the timeout in SwiftFileBackend specifically.

Reduce the default to 30 since that is a more reasonable value to use when
serving web requests. Since everything that previously used this default
was migrated to use HttpRequestFactory::createMultiClient(), the timeout
for them was already reduced from 900 to 25 with no apparent ill
effects. This cleanup change should have no production impact.

Bug: T245170
Change-Id: Id6029afa4e3f1c6551cd823c3b0def01afcdc571
2020-06-15 15:34:13 +10:00
..
data Remove DatabaseIntegrationTest::testStoredFunctions() 2020-06-02 10:47:29 +10:00
docs
documentation
includes MultiHttpClient: Reduce the default timeout from 900 to 30 2020-06-15 15:34:13 +10:00
integration/includes Merge "Fast stale ParserCache responses" 2020-06-09 14:14:09 +00:00
languages Remove unneeded ::setUp and ::tearDown methods that only call parent 2020-06-07 10:09:32 +00:00
maintenance build: Bump mediawiki-codesniffer to 31.0.0 2020-05-30 14:56:28 +00:00
mocks Fast stale ParserCache responses 2020-06-05 16:24:22 +10:00
skins
structure Merge "Fix SpecialPageFatalTest failing on unrelated deprecations" 2020-06-05 23:10:59 +00:00
suites Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
tests
unit Merge "New unit and integraton tests for class LinkHolderArray" 2020-06-10 10:09:35 +00:00
bootstrap.maintenance.php
bootstrap.php
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
Makefile
MediaWikiCliOptions.php
MediaWikiCoversValidator.php
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitTestListener.php
MediaWikiPHPUnitCommand.php
MediaWikiPHPUnitResultPrinter.php phpunit: Move "Logs generated by test" from middle to end of result 2020-05-22 20:48:28 +01:00
MediaWikiPHPUnitTestListener.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MediaWikiTestCaseTrait.php Replace all call_user_func(_array) in all tests 2020-06-06 18:41:20 +02:00
MediaWikiUnitTestCase.php Merge "Add getMockMessage to MediaWikiTestCaseTrait" 2020-06-03 18:46:43 +00:00
phpunit.php Call ob_start() before running tests 2020-05-25 13:55:28 +10:00
PHPUnit4And6Compat.php
PHPUnit6And8Compat.php
README
ResourceLoaderTestCase.php Fix some PSR12.Properties.ConstantVisibility.NotFound in tests/phpunit/ 2020-05-09 23:55:09 +00:00
run-tests.bat
suite.xml

== MediaWiki PHPUnit Tests ==

The unit and integration tests for MediaWiki are implemented using the PHPUnit testing
framework and require PHPUnit to run.


=== WARNING ===

Some of the integration tests are DESTRUCTIVE and WILL ALTER YOUR WIKI'S CONTENTS.

DO NOT RUN THESE TESTS ON A PRODUCTION SYSTEM OR ON ANY SYSTEM WHERE YOU NEED
TO RETAIN YOUR DATA.


== Installation ==

If you used composer to install MediaWiki's dependencies PHPUnit will already be available, unless
you explicitly specified the --no-dev flag during the install. In this case just run "composer update".

Otherwise follow the installation instructions in the
PHPUnit Manual at:

  https://phpunit.de/manual/current/en/installation.html


== Running tests ==

The tests are run from your operating system's command line.

Ensure that you are in the tests/phpunit directory of your MediaWiki
installation.


On Unix-like operating systems, the tests runs are controlled with a makefile.
Run command:

  make help

for a full list of options for running tests.


On Windows-family operating systems, run the 'run-tests.bat' batch file.


=== Writing tests ===

A guide to writing PHP unit tests for MediaWiki can be found at:

	https://www.mediawiki.org/wiki/Manual:PHP_unit_testing