From 7061b91b21a0fcf82590acff36298d8e236d1ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Wed, 6 Oct 2021 18:29:44 +0200 Subject: [PATCH] test with 1.6k --- TestCase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestCase.php b/TestCase.php index 2b8be3a833..2b3c9863df 100644 --- a/TestCase.php +++ b/TestCase.php @@ -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(); @@ -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)" )); }