X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=xt%2Fimapd-validate.t;h=5d27d2a0655eefddb914522a62453311a9c1c467;hb=d323a16ced5e3a77136a1ebca4a2f7d5678121c4;hp=9a56c2d04c8fefc62aeead2f52da0bc1e6a1b193;hpb=27f17d80e4e8e15b5e7d50045b1853ec7bdb4b3b;p=public-inbox.git
diff --git a/xt/imapd-validate.t b/xt/imapd-validate.t
index 9a56c2d0..5d27d2a0 100644
--- a/xt/imapd-validate.t
+++ b/xt/imapd-validate.t
@@ -1,9 +1,9 @@
#!perl -w
-# Copyright (C) 2020 all contributors
+# Copyright (C) 2020-2021 all contributors
# License: AGPL-3.0+
# Expensive test to validate compression and TLS.
use strict;
-use Test::More;
+use v5.10.1;
use Symbol qw(gensym);
use PublicInbox::DS qw(now);
use POSIX qw(_exit);
@@ -15,7 +15,7 @@ my $BATCH = $ENV{TEST_BATCH} // 100;
my $REPEAT = $ENV{TEST_REPEAT} // 1;
diag "TEST_BATCH=$BATCH TEST_REPEAT=$REPEAT";
-require_mods(qw(Mail::IMAPClient));
+require_mods(qw(Mail::IMAPClient -imapd));
my $imap_client = 'Mail::IMAPClient';
my $can_compress = $imap_client->can('compress');
if ($can_compress) { # hope this gets fixed upstream, soon
@@ -152,11 +152,11 @@ $make_local_server = sub {
# not using multiple workers, here, since we want to increase
# the chance of tripping concurrency bugs within PublicInbox/IMAP*.pm
my $cmd = [ '-imapd', "--stdout=$out", "--stderr=$err", '-W0' ];
- push @$cmd, '-limap://'.$imap->sockhost.':'.$imap->sockport;
+ push @$cmd, '-limap://'.tcp_host_port($imap);
if ($test_tls) {
my $imaps = tcp_server();
$rdr->{4} = $imaps;
- push @$cmd, '-limaps://'.$imaps->sockhost.':'.$imaps->sockport;
+ push @$cmd, '-limaps://'.tcp_host_port($imaps);
push @$cmd, "--cert=$cert", "--key=$key";
my $tls_opt = [
SSL_hostname => 'server.local',