X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=xt%2Fhttpd-async-stream.t;h=0658c691c826131a5080acba36ace71858591f86;hb=HEAD;hp=f6715c58bc31d97476aa2ee4b20918191b73c0cc;hpb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;p=public-inbox.git diff --git a/xt/httpd-async-stream.t b/xt/httpd-async-stream.t index f6715c58..0658c691 100644 --- a/xt/httpd-async-stream.t +++ b/xt/httpd-async-stream.t @@ -1,17 +1,17 @@ #!perl -w -# Copyright (C) 2020-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ # Expensive test to validate compression and TLS. use strict; -use Test::More; +use v5.10.1; use PublicInbox::TestCommon; use PublicInbox::DS qw(now); -use PublicInbox::Spawn qw(which popen_rd); +use PublicInbox::Spawn qw(popen_rd); use Digest::MD5; use POSIX qw(_exit); my $inboxdir = $ENV{GIANT_INBOX_DIR}; plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless $inboxdir; -my $curl = which('curl') or plan skip_all => "curl(1) missing for $0"; +my $curl = require_cmd('curl'); my ($tmpdir, $for_destroy) = tmpdir(); require_mods(qw(DBD::SQLite)); my $JOBS = $ENV{TEST_JOBS} // 4; @@ -41,7 +41,7 @@ address = test\@example.com # not using multiple workers, here, since we want to increase # the chance of tripping concurrency bugs within PublicInbox/HTTP*.pm my $cmd = [ '-httpd', "--stdout=$out", "--stderr=$err", '-W0' ]; - my $host_port = $http->sockhost.':'.$http->sockport; + my $host_port = tcp_host_port($http); push @$cmd, "-lhttp://$host_port"; my $url = "$host_port/test/$endpoint"; print STDERR "# CMD ". join(' ', @$cmd). "\n";