Skip to content

Commit 481ccb6

Browse files
author
amin
committed
update tests
1 parent 8cffb34 commit 481ccb6

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

tests/RTCIceConnectionTest.php

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ public function testConnectToIceLiteNominationFails()
422422

423423
public function testConnectIpv6()
424424
{
425-
if (!$this->isSupportIPv6()) {
425+
if (!$this->isSupportIPv6() || getenv('CI') === 'true') {
426426
$this->markTestSkipped('CI lacks IPv6');
427427
}
428428

@@ -510,7 +510,7 @@ public function testConnectInvalidPassword()
510510
$connection1->setRemotePassword('wrong-password');
511511

512512
async(function () use ($connection1, $connection2) {
513-
delay(.2);
513+
delay(1);
514514
$connection1->close();
515515
$connection2->close();
516516
})();
@@ -541,7 +541,7 @@ public function testConnectInvalidUsername()
541541
$connection1->setRemotePassword($connection2->getLocalPassword());
542542

543543
async(function () use ($connection1, $connection2) {
544-
delay(.2);
544+
delay(1);
545545
$connection1->close();
546546
$connection2->close();
547547
})();
@@ -719,6 +719,10 @@ public function testConnectWithStunServer()
719719

720720
public function testConnectWithStunServerDnsLookupError()
721721
{
722+
if (getenv('CI') === 'true') {
723+
$this->markTestSkipped('Got conflict on GitHub Actions.');
724+
}
725+
722726
$config = clone $this->config;
723727
$config->setStunServer(['fakestun.test', 3478]); // invalid stun server domain name
724728
$connection1 = new RTCIceConnection($config, IceRole::Controlling);
@@ -750,6 +754,10 @@ public function testConnectWithStunServerDnsLookupError()
750754

751755
public function testConnectWithStunServerTimeout()
752756
{
757+
if (getenv('CI') === 'true') {
758+
$this->markTestSkipped('Got conflict on GitHub Actions.');
759+
}
760+
753761
$config = clone $this->config;
754762
$config->setStunServer(['127.0.0.1', 1234]); // Invalid port causes timout
755763
$connection1 = new RTCIceConnection($config, IceRole::Controlling);
@@ -781,7 +789,7 @@ public function testConnectWithStunServerTimeout()
781789

782790
public function testConnectWithStunServerIpv6()
783791
{
784-
if (!$this->isSupportIPv6()) {
792+
if (!$this->isSupportIPv6() || getenv('CI') === 'true') {
785793
$this->markTestSkipped('CI lacks IPv6');
786794
}
787795

@@ -1048,6 +1056,10 @@ public function testAddRemoteCandidateMdnsBad()
10481056

10491057
public function testAddRemoteCandidateMdnsGood()
10501058
{
1059+
if (getenv('CI') === 'true') {
1060+
$this->markTestSkipped('Multicast networking not available on GitHub Actions.');
1061+
}
1062+
10511063
$mdnsMock = new MdnsServerMock(['test.local' => '192.168.1.20']);
10521064
$mdnsMock->start();
10531065

0 commit comments

Comments
 (0)