@@ -533,7 +533,7 @@ function testNoMemoryLeak($type, $args)
533
533
534
534
function testExecutionOrderGuarantees ()
535
535
{
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 " );
537
537
$ this ->start (function (Driver $ loop ) use (&$ ticks ) {
538
538
$ f = function () use ($ loop ) {
539
539
$ args = func_get_args ();
@@ -549,7 +549,7 @@ function testExecutionOrderGuarantees()
549
549
$ loop ->onWritable (STDIN , $ f (0 , 5 ));
550
550
$ writ1 = $ loop ->onWritable (STDIN , $ f (0 , 5 ));
551
551
$ writ2 = $ loop ->onWritable (STDIN , $ f (0 , 5 ));
552
-
552
+
553
553
$ loop ->delay ($ msDelay = 0 , $ f (0 , 5 ));
554
554
$ del1 = $ loop ->delay ($ msDelay = 0 , $ f (0 , 5 ));
555
555
$ del2 = $ loop ->delay ($ msDelay = 0 , $ f (0 , 5 ));
@@ -585,14 +585,14 @@ function testExecutionOrderGuarantees()
585
585
$ loop ->enable ($ del4 );
586
586
$ loop ->onWritable (STDIN , $ f (1 , 3 ));
587
587
});
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 ));
594
594
$ loop ->disable ($ rep1 );
595
- $ loop ->delay ($ msDelay = 5 , $ f (2 , 1 ));
595
+ $ loop ->delay ($ msDelay = 500 , $ f (2 , 1 ));
596
596
$ loop ->enable ($ rep1 );
597
597
598
598
$ loop ->defer ($ f (0 , 1 ));
@@ -612,9 +612,9 @@ function testExecutionOrderGuarantees()
612
612
$ loop ->defer (function () use ($ loop , $ del5 , $ f ) {
613
613
$ loop ->enable ($ del5 );
614
614
$ 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 )
616
616
$ loop ->defer (function () use ($ loop , $ f ) {
617
- $ loop ->defer ($ f (3 , 0 ));
617
+ $ loop ->defer ($ f (4 , 0 ));
618
618
});
619
619
});
620
620
});
0 commit comments