0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-23 00:51:51 +00:00

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.
This commit is contained in:
Stefan Siegl 2014-11-16 20:20:43 +01:00
parent 6ee72b6f0a
commit cd44e72683

View File

@ -7,8 +7,11 @@ Test V8::executeString() : Time limit
$JS = <<< EOT $JS = <<< EOT
var text = "abcdefghijklmnopqrstuvwyxz0123456789"; var text = "abcdefghijklmnopqrstuvwyxz0123456789";
var memory = ""; var memory = "";
for (var i = 0; i < 1000000; ++i) { for (var i = 0; i < 100; ++i) {
memory += text; for (var j = 0; j < 10000; ++j) {
memory += text;
}
sleep(0);
} }
EOT; EOT;