Skip to content

Commit 33d9995

Browse files
committed
Increase timeouts to avoid xdebug issues
Tests would sometimes fail due to xdebug slowing down the loop.
1 parent 1fe1eb1 commit 33d9995

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Test.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ function testNoMemoryLeak($type, $args)
533533

534534
function testExecutionOrderGuarantees()
535535
{
536-
$this->expectOutputString("01 02 03 04 ".str_repeat("05 ", 8)."10 11 12 ".str_repeat("13 ", 4)."20 21 21 21 21 22 30 31 ");
536+
$this->expectOutputString("01 02 03 04 ".str_repeat("05 ", 8)."10 11 12 ".str_repeat("13 ", 4)."20 ".str_repeat("21 ", 4)."30 40 41 ");
537537
$this->start(function(Driver $loop) use (&$ticks) {
538538
$f = function() use ($loop) {
539539
$args = func_get_args();
@@ -549,7 +549,7 @@ function testExecutionOrderGuarantees()
549549
$loop->onWritable(STDIN, $f(0, 5));
550550
$writ1 = $loop->onWritable(STDIN, $f(0, 5));
551551
$writ2 = $loop->onWritable(STDIN, $f(0, 5));
552-
552+
553553
$loop->delay($msDelay = 0, $f(0, 5));
554554
$del1 = $loop->delay($msDelay = 0, $f(0, 5));
555555
$del2 = $loop->delay($msDelay = 0, $f(0, 5));
@@ -585,14 +585,14 @@ function testExecutionOrderGuarantees()
585585
$loop->enable($del4);
586586
$loop->onWritable(STDIN, $f(1, 3));
587587
});
588-
589-
$loop->delay($msDelay = 25, $f(3, 1));
590-
$loop->delay($msDelay = 6, $f(2, 2));
591-
$loop->delay($msDelay = 5, $f(2, 1));
592-
$loop->repeat($msDelay = 5, $f(2, 1));
593-
$rep1 = $loop->repeat($msDelay = 5, $f(2, 1));
588+
589+
$loop->delay($msDelay = 1000, $f(4, 1));
590+
$loop->delay($msDelay = 600, $f(3, 0));
591+
$loop->delay($msDelay = 500, $f(2, 1));
592+
$loop->repeat($msDelay = 500, $f(2, 1));
593+
$rep1 = $loop->repeat($msDelay = 50, $f(2, 1));
594594
$loop->disable($rep1);
595-
$loop->delay($msDelay = 5, $f(2, 1));
595+
$loop->delay($msDelay = 500, $f(2, 1));
596596
$loop->enable($rep1);
597597

598598
$loop->defer($f(0, 1));
@@ -612,9 +612,9 @@ function testExecutionOrderGuarantees()
612612
$loop->defer(function() use ($loop, $del5, $f) {
613613
$loop->enable($del5);
614614
$loop->defer(function() use ($loop, $f) {
615-
usleep(7000); // to have $msDelay == 5 and $msDelay == 6 run at the same tick (but not $msDelay == 15)
615+
usleep(700000); // to have $msDelay == 500 and $msDelay == 600 run at the same tick (but not $msDelay == 150)
616616
$loop->defer(function () use ($loop, $f) {
617-
$loop->defer($f(3, 0));
617+
$loop->defer($f(4, 0));
618618
});
619619
});
620620
});

0 commit comments

Comments
 (0)