jenkins-bot has submitted this change and it was merged.
Change subject: Try to stop unit tests from acting up by using smaller files
......................................................................
Try to stop unit tests from acting up by using smaller files
Jenkins keeps saying "libgomp: Thread creation failed: Resource
temporarily unavailable" which google says is mem limit related,
however locally the test works even with the shell mem limit
set to a mere 50 MB (but I'm using newer image magick).
Anyways, this can't hurt.
Change-Id: I85de5ebe331e56d79a2e9e91a38ba1231eddab8a
---
M tests/PagedTiffHandlerTest.php
M tests/testImages/large.tiff
2 files changed, 5 insertions(+), 1 deletion(-)
Approvals:
Gilles: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/PagedTiffHandlerTest.php b/tests/PagedTiffHandlerTest.php
index 0d0fc2d..f3f486e 100644
--- a/tests/PagedTiffHandlerTest.php
+++ b/tests/PagedTiffHandlerTest.php
@@ -175,6 +175,10 @@
}
function testDoTransformLarge() {
+ // Artificially make this small. Jenkins kept OOMing on
+ // big images.
+ $this->setMwGlobals( 'wgTiffIntermediaryScaleStep', 480 );
+
$params = array( 'width' => 120, 'lossy' => 'lossy' );
$thumb = $this->large_image->transform( $params,
File::RENDER_FORCE );
$this->assertFalse( $thumb->isError(), "Error rendering
thumbnail: " . ( $thumb->isError() ? $thumb->toText() : '' ) );
@@ -182,7 +186,7 @@
$this->assertGreaterThan( 0, filesize(
$thumb->getLocalCopyPath() ) );
// Verify that an intermediate thumb was actually made
- $intermediateParams = array( 'width' => 2500, 'lossy' =>
'lossless' );
+ $intermediateParams = array( 'width' => 500, 'lossy' =>
'lossless' );
$this->large_image->getHandler()->normaliseParams(
$this->large_image, $intermediateParams );
$thumbName = $this->large_image->thumbName( $intermediateParams
);
diff --git a/tests/testImages/large.tiff b/tests/testImages/large.tiff
index cc61342..d3d1477 100644
--- a/tests/testImages/large.tiff
+++ b/tests/testImages/large.tiff
Binary files differ
--
To view, visit https://gerrit.wikimedia.org/r/164374
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I85de5ebe331e56d79a2e9e91a38ba1231eddab8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PagedTiffHandler
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits