Skip to content

Commit

Permalink
test with 1.6k
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Oct 6, 2021
1 parent 98683ac commit 7061b91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag):
public function runBare(): void
{
gc_collect_cycles(); gc_collect_cycles(); gc_collect_cycles();
$memDiffs = array_fill(0, 16 /* 64 for CI */, 0);
$memDiffs = array_fill(0, 16_00/* 64 for CI */, 0);
$mem0 = memory_get_usage();
for ($i = -1; $i < count($memDiffs); ++$i) {
$this->_runBare(); gc_collect_cycles(); gc_collect_cycles(); gc_collect_cycles();
Expand All @@ -1107,7 +1107,7 @@ public function runBare(): void
rsort($memDiffs);
if (array_sum($memDiffs) >= 4096 * 1024 || $memDiffs[2] > 0) {
$this->onNotSuccessfulTest(new AssertionFailedError(
"Memory leak detected! (" . round($mem0 / 1024 / 1024, 3) . " MB + " . implode(' + ', array_map(fn ($v) => number_format($v / 1024, 3, '.', ' ') . " KB", array_filter($memDiffs))) . ", " . ($i + 2) . " iterations)"
"Memory leak detected! (" . round($mem0 / 1024 / 1024, 3) . " MB + (" . implode(' + ', array_map(fn ($v) => number_format($v / 1024, 3, '.', ' '), array_filter($memDiffs))) . ") KB, " . ($i + 2) . " iterations)"
));
}

Expand Down

0 comments on commit 7061b91

Please sign in to comment.