X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fperf-nntpd.t;h=f272e18add0c13c046c8836e9bd5b5ab47a0a151;hb=b41c19abcf0b0ac8a5f55678bfb0058ad50b3179;hp=ce3cc409b138e9ff751bea1f0f9955589f65ae70;hpb=0b84d8600368c67080e683e415f7e502a343316b;p=public-inbox.git diff --git a/t/perf-nntpd.t b/t/perf-nntpd.t index ce3cc409..f272e18a 100644 --- a/t/perf-nntpd.t +++ b/t/perf-nntpd.t @@ -1,4 +1,4 @@ -# Copyright (C) 2018 all contributors +# Copyright (C) 2018-2019 all contributors # License: AGPL-3.0+ use strict; use warnings; @@ -44,14 +44,7 @@ if (($ENV{NNTP_TEST_URL} || '') =~ m!\Anntp://([^/]+)/([^/]+)\z!) { close $fh or die "close($pi_config): $!"; } - %opts = ( - LocalAddr => '127.0.0.1', - ReuseAddr => 1, - Proto => 'tcp', - Listen => 1024, - ); - my $sock = IO::Socket::INET->new(%opts); - + my $sock = tcp_server(); ok($sock, 'sock created'); my $cmd = [ $nntpd, '-W0' ]; $pid = spawn_listener({ PI_CONFIG => $pi_config }, $cmd, [$sock]);