]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/nntpd.t
tests: common tcp_server and unix_server helpers
[public-inbox.git] / t / nntpd.t
index bf5bb883f728dcb8f500ff67b831962e8b40c174..0e59de07ed5315166557258bcdf804469d2d50d6 100644 (file)
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -36,14 +36,8 @@ SKIP: {
        use_ok 'PublicInbox::V2Writable';
 }
 
-my %opts = (
-       LocalAddr => '127.0.0.1',
-       ReuseAddr => 1,
-       Proto => 'tcp',
-       Type => SOCK_STREAM,
-       Listen => 1024,
-);
-my $sock = IO::Socket::INET->new(%opts);
+my %opts;
+my $sock = tcp_server();
 my $pid;
 my $len;
 END { kill 'TERM', $pid if defined $pid };