Skip to content

Commit

Permalink
EmptyPort: isolate our own version of EmptyPort
Browse files Browse the repository at this point in the history
so we can try seeing if it is the problem
  • Loading branch information
rjbs committed Feb 6, 2024
1 parent e398c19 commit 32f29ba
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 15 deletions.
4 changes: 2 additions & 2 deletions t/dates.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use utf8;

use experimental qw( signatures );

use lib 'lib';
use lib 'lib', 't/lib';

use Test::More;

Expand All @@ -15,7 +15,7 @@ use IO::Async::Loop;
use IO::Async::Test;
use IO::Async::Timer::Periodic;
use Net::Async::HTTP;
use Net::EmptyPort qw(empty_port);
use Synergy::Test::EmptyPort qw(empty_port);
use Synergy::Hub;

# Initialize Synergy.
Expand Down
4 changes: 2 additions & 2 deletions t/exclusive.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use v5.32.0;
use warnings;

use lib 'lib';
use lib 'lib', 't/lib';

use Test::More;

Expand All @@ -12,7 +12,7 @@ use IO::Async::Loop;
use IO::Async::Test;
use IO::Async::Timer::Periodic;
use Net::Async::HTTP;
use Net::EmptyPort qw(empty_port);
use Synergy::Test::EmptyPort qw(empty_port);
use Synergy::Hub;

# Initialize Synergy.
Expand Down
4 changes: 2 additions & 2 deletions t/httpendpoint.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use v5.32.0;
use warnings;

use lib 'lib';
use lib 'lib', 't/lib';

use Test::More;

Expand All @@ -13,7 +13,7 @@ use IO::Async::Loop;
use IO::Async::Test;
use IO::Async::Timer::Periodic;
use Net::Async::HTTP;
use Net::EmptyPort qw(empty_port);
use Synergy::Test::EmptyPort qw(empty_port);
use Plack::Response;
use MIME::Base64 'encode_base64';
use Synergy::Hub;
Expand Down
4 changes: 2 additions & 2 deletions t/https.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use v5.32.0;
use warnings;

use lib 'lib';
use lib 'lib', 't/lib';

use Test::More;

Expand All @@ -13,7 +13,7 @@ use IO::Async::Loop;
use IO::Async::Test;
use IO::Async::Timer::Periodic;
use Net::Async::HTTP;
use Net::EmptyPort qw(empty_port);
use Synergy::Test::EmptyPort qw(empty_port);
use Plack::Response;
use Synergy::Hub;

Expand Down
4 changes: 2 additions & 2 deletions t/httpserver.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use v5.32.0;
use warnings;

use lib 'lib';
use lib 'lib', 't/lib';

use Test::More;

Expand All @@ -13,7 +13,7 @@ use IO::Async::Loop;
use IO::Async::Test;
use IO::Async::Timer::Periodic;
use Net::Async::HTTP;
use Net::EmptyPort qw(empty_port);
use Synergy::Test::EmptyPort qw(empty_port);
use Plack::Response;
use Synergy::Hub;

Expand Down
19 changes: 19 additions & 0 deletions t/lib/Synergy/Test/EmptyPort.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package Synergy::Test::EmptyPort;
use strict;
use warnings;

use experimental qw(signatures);

use Net::EmptyPort ();

use Sub::Exporter -setup => [ qw(empty_port) ];

sub empty_port () {
if ($ENV{GITHUB_ACTIONS}) {
return 60606;
}

return Net::EmptyPort::empty_port();
}

1;
2 changes: 1 addition & 1 deletion t/lib/Synergy/Tester.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use Synergy::Logger::Test '$Logger';

use IO::Async::Test;
use Synergy::Hub;
use Net::EmptyPort qw(empty_port);
use Synergy::Test::EmptyPort qw(empty_port);

package Synergy::Tester::Result {

Expand Down
4 changes: 2 additions & 2 deletions t/page.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use v5.32.0;
use warnings;

use lib 'lib';
use lib 'lib', 't/lib';

use Test::More;

Expand All @@ -12,7 +12,7 @@ use IO::Async::Loop;
use IO::Async::Test;
use IO::Async::Timer::Periodic;
use Net::Async::HTTP;
use Net::EmptyPort qw(empty_port);
use Synergy::Test::EmptyPort qw(empty_port);
use Path::Tiny ();
use Synergy::Hub;

Expand Down
4 changes: 2 additions & 2 deletions t/prometheus.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use v5.32.0;
use warnings;

use lib 'lib';
use lib 'lib', 't/lib';

use Test::More;

Expand All @@ -13,7 +13,7 @@ use IO::Async::Loop;
use IO::Async::Test;
use IO::Async::Timer::Periodic;
use Net::Async::HTTP;
use Net::EmptyPort qw(empty_port);
use Synergy::Test::EmptyPort qw(empty_port);
use Synergy::Hub;

# Initialize Synergy.
Expand Down

0 comments on commit 32f29ba

Please sign in to comment.