From: daniel Date: Tue, 13 Mar 2018 19:32:18 +0000 (+0100) Subject: Avoid dumping big stack traces from unit tests. X-Git-Tag: 1.31.0-rc.0~394 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=9c1d8a970921c4741b6c2351d5d4ecefd0be09a7;p=lhc%2Fweb%2Fwiklou.git Avoid dumping big stack traces from unit tests. Using assertFalse( $exception ) results in potentially very large stack trace dumps, when $exception is an exception from deep inside MediaWiki. Stack trace dumps include a dump of all parameters, resulting in console output of (in my case) over 160 MB. Change-Id: Ib78493d86531844a892586c071b2fa631ad765eb --- diff --git a/tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php b/tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php index bdb4831a93..076924c87c 100644 --- a/tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php +++ b/tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php @@ -89,20 +89,11 @@ class ImportLinkCacheIntegrationTest extends MediaWikiTestCase { $reporter->setContext( new RequestContext() ); $reporter->open(); - $exception = false; - try { - $importer->doImport(); - } catch ( Exception $e ) { - $exception = $e; - } + $importer->doImport(); $result = $reporter->close(); - $this->assertFalse( - $exception - ); - $this->assertTrue( $result->isGood() );