X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=xt%2Fnntpd-validate.t;h=83f024f984ebdf9f56d45c433fd919201ba9ead7;hb=HEAD;hp=322e6f620795a1a5439ff04a1165b2ae8d23e94e;hpb=95bdac7f09c69036efed537a4d03d5bdd2ae4eb6;p=public-inbox.git
diff --git a/xt/nntpd-validate.t b/xt/nntpd-validate.t
index 322e6f62..a6f3980e 100644
--- a/xt/nntpd-validate.t
+++ b/xt/nntpd-validate.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 all contributors
+# Copyright (C) all contributors
# License: AGPL-3.0+
# Integration test to validate compression.
@@ -9,6 +9,7 @@ use Symbol qw(gensym);
use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC);
use POSIX qw(_exit);
use PublicInbox::TestCommon;
+use PublicInbox::SHA;
my $inbox_dir = $ENV{GIANT_INBOX_DIR};
plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless $inbox_dir;
my $mid = $ENV{TEST_MID};
@@ -55,7 +56,7 @@ sub do_get_all {
my ($methods) = @_;
my $desc = join(',', @$methods);
my $t0 = clock_gettime(CLOCK_MONOTONIC);
- my $dig = Digest::SHA->new(1);
+ my $dig = PublicInbox::SHA->new(1);
my $digfh = gensym;
my $tmpfh;
if ($File::Temp::KEEP_ALL) {
@@ -169,8 +170,7 @@ sub make_local_server {
open my $fh, '>', $_ or die "truncate: $!";
}
my $sock = tcp_server();
- ok($sock, 'sock created');
- $host_port = $sock->sockhost . ':' . $sock->sockport;
+ $host_port = tcp_host_port($sock);
# not using multiple workers, here, since we want to increase
# the chance of tripping concurrency bugs within PublicInbox/NNTP*.pm