Repository navigation
Test failures on Mac OS X #121
Description
Activity
Thanks for reporting! Can anybody else with Mac OS X confirm these issues? Also, PRs would be welcome!

@clue travis supports running the tests on OS X, but IIRC it's a bit of work to get it working: https://docs.travis-ci.com/user/reference/osx/
I can confirm (latest master including #123):
1) React\Tests\Socket\FunctionalSecureServerTest::testEmitsErrorIfConnectionIsCancelled Expectation failed for method name is equal to <string:__invoke> when invoked 1 time(s). Method was expected to be called 1 times, actually called 0 times. 2) React\Tests\Socket\FunctionalTcpServerTest::testEmitsConnectionEvenIfConnectionIsCancelled Expectation failed for method name is equal to <string:__invoke> when invoked 1 time(s). Method was expected to be called 1 times, actually called 0 times.- only fails sometimes (OSX HighSierra)
- only fails sometimes (OSX HighSierra)
- is fixed by Work around Unix domain socket (UDS) paths for Mac OS X #123
~/htdocs/react-socket master ⇡ 6s ❯ repeat 10 phpunit tests/FunctionalTcpServerTest.php ................. 17 / 17 (100%) Time: 1.64 seconds, Memory: 12.00MB OK (17 tests, 31 assertions) ........F........ 17 / 17 (100%) Time: 1.62 seconds, Memory: 12.00MB There was 1 failure: 1) React\Tests\Socket\FunctionalTcpServerTest::testEmitsConnectionEvenIfConnectionIsCancelled Expectation failed for method name is equal to <string:__invoke> when invoked 1 time(s). Method was expected to be called 1 times, actually called 0 times. Tests: 17, Assertions: 30, Failures: 1. ................. 17 / 17 (100%) Time: 1.66 seconds, Memory: 12.00MB OK (17 tests, 31 assertions) ................. 17 / 17 (100%) Time: 1.62 seconds, Memory: 12.00MB OK (17 tests, 31 assertions) ........F........ 17 / 17 (100%) Time: 1.62 seconds, Memory: 12.00MB There was 1 failure: 1) React\Tests\Socket\FunctionalTcpServerTest::testEmitsConnectionEvenIfConnectionIsCancelled Expectation failed for method name is equal to <string:__invoke> when invoked 1 time(s). Method was expected to be called 1 times, actually called 0 times. Tests: 17, Assertions: 30, Failures: 1. ................. 17 / 17 (100%) Time: 1.61 seconds, Memory: 12.00MB OK (17 tests, 31 assertions) ................. 17 / 17 (100%) Time: 1.62 seconds, Memory: 12.00MB OK (17 tests, 31 assertions) ........F........ 17 / 17 (100%) Time: 1.6 seconds, Memory: 12.00MB There was 1 failure: 1) React\Tests\Socket\FunctionalTcpServerTest::testEmitsConnectionEvenIfConnectionIsCancelled Expectation failed for method name is equal to <string:__invoke> when invoked 1 time(s). Method was expected to be called 1 times, actually called 0 times. Tests: 17, Assertions: 30, Failures: 1. ........F........ 17 / 17 (100%) Time: 1.65 seconds, Memory: 12.00MB There was 1 failure: 1) React\Tests\Socket\FunctionalTcpServerTest::testEmitsConnectionEvenIfConnectionIsCancelled Expectation failed for method name is equal to <string:__invoke> when invoked 1 time(s). Method was expected to be called 1 times, actually called 0 times. Tests: 17, Assertions: 30, Failures: 1. ........F........ 17 / 17 (100%) Time: 1.6 seconds, Memory: 12.00MB There was 1 failure: 1) React\Tests\Socket\FunctionalTcpServerTest::testEmitsConnectionEvenIfConnectionIsCancelled Expectation failed for method name is equal to <string:__invoke> when invoked 1 time(s). Method was expected to be called 1 times, actually called 0 times. Tests: 17, Assertions: 30, Failures: 1.Is it possible that 1 and 2 are somehow none-deterministic?
I've checked if the underlying stream may be the culprit and found reactphp/stream#111 but it seems unrelated.
@andig does it still fail sometimes within the same run when using
--repeat 100with phpunitAfter failing once the tests get stuck for good on my slowish machine:
❯ phpunit --repeat 100 tests/TcpConnectorTest.php PHPUnit 5.5.4 by Sebastian Bergmann and contributors. ..........I...........I...........I...........I...........I.. 61 / 1200 ( 5%) .........I...........I...........I...........I...........I... 122 / 1200 ( 10%) ........I...........I...........I...........I...........I.... 183 / 1200 ( 15%) .......I...........I...........I...........I...........I..... 244 / 1200 ( 20%) E.....I.or
❯ phpunit --repeat 100 tests/TcpConnectorTest.php PHPUnit 5.5.4 by Sebastian Bergmann and contributors. ..........I...........I...........I...........I...........I.. 61 / 1200 ( 5%) .........I...........I...........I...........I...........I... 122 / 1200 ( 10%) ........I...........I...........I...........I...........I.... 183 / 1200 ( 15%) .......I...........I...........I...........I...........I..... 244 / 1200 ( 20%) ......I...........I...........I...........I....EE.....I.For the reference: Can anybody run the test suite on Windows and confirm that this is a Mac issue only?
@clue on windows it hangs on
TcpConnectorTest::connectionToEmptyPortShouldFail'
Not really an issue, more fyi: