Skip to content

Commit 32f29ba

Browse files
committed
EmptyPort: isolate our own version of EmptyPort
so we can try seeing if it is the problem
1 parent e398c19 commit 32f29ba

File tree

9 files changed

+34
-15
lines changed

9 files changed

+34
-15
lines changed

t/dates.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use utf8;
55

66
use experimental qw( signatures );
77

8-
use lib 'lib';
8+
use lib 'lib', 't/lib';
99

1010
use Test::More;
1111

@@ -15,7 +15,7 @@ use IO::Async::Loop;
1515
use IO::Async::Test;
1616
use IO::Async::Timer::Periodic;
1717
use Net::Async::HTTP;
18-
use Net::EmptyPort qw(empty_port);
18+
use Synergy::Test::EmptyPort qw(empty_port);
1919
use Synergy::Hub;
2020

2121
# Initialize Synergy.

t/exclusive.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
use v5.32.0;
33
use warnings;
44

5-
use lib 'lib';
5+
use lib 'lib', 't/lib';
66

77
use Test::More;
88

@@ -12,7 +12,7 @@ use IO::Async::Loop;
1212
use IO::Async::Test;
1313
use IO::Async::Timer::Periodic;
1414
use Net::Async::HTTP;
15-
use Net::EmptyPort qw(empty_port);
15+
use Synergy::Test::EmptyPort qw(empty_port);
1616
use Synergy::Hub;
1717

1818
# Initialize Synergy.

t/httpendpoint.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use v5.32.0;
44
use warnings;
55

6-
use lib 'lib';
6+
use lib 'lib', 't/lib';
77

88
use Test::More;
99

@@ -13,7 +13,7 @@ use IO::Async::Loop;
1313
use IO::Async::Test;
1414
use IO::Async::Timer::Periodic;
1515
use Net::Async::HTTP;
16-
use Net::EmptyPort qw(empty_port);
16+
use Synergy::Test::EmptyPort qw(empty_port);
1717
use Plack::Response;
1818
use MIME::Base64 'encode_base64';
1919
use Synergy::Hub;

t/https.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use v5.32.0;
44
use warnings;
55

6-
use lib 'lib';
6+
use lib 'lib', 't/lib';
77

88
use Test::More;
99

@@ -13,7 +13,7 @@ use IO::Async::Loop;
1313
use IO::Async::Test;
1414
use IO::Async::Timer::Periodic;
1515
use Net::Async::HTTP;
16-
use Net::EmptyPort qw(empty_port);
16+
use Synergy::Test::EmptyPort qw(empty_port);
1717
use Plack::Response;
1818
use Synergy::Hub;
1919

t/httpserver.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use v5.32.0;
44
use warnings;
55

6-
use lib 'lib';
6+
use lib 'lib', 't/lib';
77

88
use Test::More;
99

@@ -13,7 +13,7 @@ use IO::Async::Loop;
1313
use IO::Async::Test;
1414
use IO::Async::Timer::Periodic;
1515
use Net::Async::HTTP;
16-
use Net::EmptyPort qw(empty_port);
16+
use Synergy::Test::EmptyPort qw(empty_port);
1717
use Plack::Response;
1818
use Synergy::Hub;
1919

t/lib/Synergy/Test/EmptyPort.pm

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package Synergy::Test::EmptyPort;
2+
use strict;
3+
use warnings;
4+
5+
use experimental qw(signatures);
6+
7+
use Net::EmptyPort ();
8+
9+
use Sub::Exporter -setup => [ qw(empty_port) ];
10+
11+
sub empty_port () {
12+
if ($ENV{GITHUB_ACTIONS}) {
13+
return 60606;
14+
}
15+
16+
return Net::EmptyPort::empty_port();
17+
}
18+
19+
1;

t/lib/Synergy/Tester.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use Synergy::Logger::Test '$Logger';
88

99
use IO::Async::Test;
1010
use Synergy::Hub;
11-
use Net::EmptyPort qw(empty_port);
11+
use Synergy::Test::EmptyPort qw(empty_port);
1212

1313
package Synergy::Tester::Result {
1414

t/page.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
use v5.32.0;
33
use warnings;
44

5-
use lib 'lib';
5+
use lib 'lib', 't/lib';
66

77
use Test::More;
88

@@ -12,7 +12,7 @@ use IO::Async::Loop;
1212
use IO::Async::Test;
1313
use IO::Async::Timer::Periodic;
1414
use Net::Async::HTTP;
15-
use Net::EmptyPort qw(empty_port);
15+
use Synergy::Test::EmptyPort qw(empty_port);
1616
use Path::Tiny ();
1717
use Synergy::Hub;
1818

t/prometheus.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use v5.32.0;
44
use warnings;
55

6-
use lib 'lib';
6+
use lib 'lib', 't/lib';
77

88
use Test::More;
99

@@ -13,7 +13,7 @@ use IO::Async::Loop;
1313
use IO::Async::Test;
1414
use IO::Async::Timer::Periodic;
1515
use Net::Async::HTTP;
16-
use Net::EmptyPort qw(empty_port);
16+
use Synergy::Test::EmptyPort qw(empty_port);
1717
use Synergy::Hub;
1818

1919
# Initialize Synergy.

0 commit comments

Comments
 (0)