8000 Skip failing test for macOS and windows · reactphp/socket@1370711 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1370711

Browse files
committed
Skip failing test for macOS and windows
1 parent 7ec5fbd commit 1370711

4 files changed

+11
-3
lines changed

tests/FunctionalConnectorTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ public function connectionToTcpServerShouldSucceedWithLocalhost()
4040
*/
4141
public function testConnectTwiceWithoutHappyEyeBallsOnlySendsSingleDnsQueryDueToLocalDnsCache()
4242
{
43+
if ((DIRECTORY_SEPARATOR === '\\' && PHP_VERSION_ID < 70000) || defined('HHVM_VERSION')) {
44+
$this->markTestSkipped('Not supported on windows for PHP versions < 7.0 and legacy HHVM');
45+
}
46+
4347
$loop = Factory::create();
4448

4549
$socket = stream_socket_server('udp://127.0.0.1:0', $errno, $errstr, STREAM_SERVER_BIND);

tests/FunctionalSecureServerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class FunctionalSecureServerTest extends TestCase
1717
{
18-
const TIMEOUT = 0.5;
18+
const TIMEOUT = 2;
1919

2020
/**
2121
* @before
@@ -174,7 +174,7 @@ public function testClientUsesTls10WhenCryptoMethodIsExplicitlyConfiguredByClien
174174
try {
175175
$client = Block\await($promise, $loop, self::TIMEOUT);
176176
} catch (\RuntimeException $e) {
177-
if (strpos($e->getMessage(), 'no protocols available') !== false) {
177+
if (strpos($e->getMessage(), 'no protocols available') !== false || strpos($e->getMessage(), 'routines:state_machine:internal error') !== false) {
178178
$this->markTestSkipped('TLS v1.0 not available on this system');
179179
}
180180

tests/IntegrationTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ public function gettingPlaintextStuffFromEncryptedGoogleShouldNotWork()
101101

102102
public function testConnectingFailsIfConnectorUsesInvalidDnsResolverAddress()
103103
{
104+
if (PHP_OS === 'Darwin') {
105+
$this->markTestSkipped('Skipped on macOS due to a bug in reactphp/dns (solved in reactphp/dns#171)');
106+
}
107+
104108
$loop = Factory::create();
105109

106110
$factory = new ResolverFactory();

tests/SecureIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class SecureIntegrationTest extends TestCase
1717
{
5363
18-
const TIMEOUT = 0.5;
18+
const TIMEOUT = 2;
1919

2020
private $loop;
2121
private $server;

0 commit comments

Comments
 (0)
0