From cd44e726832ec23898bdcb96e57b905f6d45927b Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sun, 16 Nov 2014 20:20:43 +0100 Subject: [PATCH] Slow down memory_limit test Otherwise the test may execute so fast, that the watchdog thread, ticking at 10ms currently, is too slow to detect the memory limit situation. --- tests/memory_limit.phpt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/memory_limit.phpt b/tests/memory_limit.phpt index 271a6a2..4f08dae 100644 --- a/tests/memory_limit.phpt +++ b/tests/memory_limit.phpt @@ -7,8 +7,11 @@ Test V8::executeString() : Time limit $JS = <<< EOT var text = "abcdefghijklmnopqrstuvwyxz0123456789"; var memory = ""; -for (var i = 0; i < 1000000; ++i) { - memory += text; +for (var i = 0; i < 100; ++i) { + for (var j = 0; j < 10000; ++j) { + memory += text; + } + sleep(0); } EOT;