Skip to content

Commit

Permalink
Set test values to be more reasonable to try to avoid them being reje…
Browse files Browse the repository at this point in the history
…cted.
  • Loading branch information
Danack committed Jul 7, 2024
1 parent 8b401da commit b8c9f98
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/014-setresourcelimit.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ require_once(dirname(__FILE__) . '/skipif.inc');

$k = 1024;
$m = $k * $k;
$g = $k * $m;
$t = $k * $g;


// These tests are flaky as the values ImageMagick will accept
// are limited by the policy.xml of the system.
Expand All @@ -29,10 +28,10 @@ $tests = array(
Imagick::RESOURCETYPE_FILE => 100,

// Set maximum amount of memory map in bytes to allocate for the pixel cache. When this limit is exceeded, the image pixels are cached to disk
Imagick::RESOURCETYPE_MAP => 10 * $g,
Imagick::RESOURCETYPE_MAP => 123 * $m,

// Set maximum amount of memory in bytes to allocate for the pixel cache from the heap. When this limit is exceeded, the image pixels are cached to memory-mapped disk
Imagick::RESOURCETYPE_MEMORY => 10 * $g,
Imagick::RESOURCETYPE_MEMORY => 234 * $m,
);

if (defined('Imagick::RESOURCETYPE_TIME')) {
Expand Down

0 comments on commit b8c9f98

Please sign in to comment.