about summary refs log tree commit homepage
path: root/xt/pop3d-mpop.t
diff options
context:
space:
mode:
Diffstat (limited to 'xt/pop3d-mpop.t')
-rw-r--r--xt/pop3d-mpop.t17
1 files changed, 8 insertions, 9 deletions
diff --git a/xt/pop3d-mpop.t b/xt/pop3d-mpop.t
index 8648b953..ff8bb5dc 100644
--- a/xt/pop3d-mpop.t
+++ b/xt/pop3d-mpop.t
@@ -5,15 +5,15 @@
 use v5.12;
 use File::Path qw(make_path);
 use PublicInbox::TestCommon;
-use PublicInbox::Spawn qw(which spawn);
+use PublicInbox::Spawn qw(spawn);
 my $inboxdir = $ENV{GIANT_INBOX_DIR};
 (defined($inboxdir) && -d $inboxdir) or
         plan skip_all => "GIANT_INBOX_DIR not defined for $0";
 plan skip_all => "bad characters in $inboxdir" if $inboxdir =~ m![^\w\.\-/]!;
-my $uuidgen = which('uuidgen') or plan skip_all => 'uuidgen(1) missing';
-require_mods(qw(DBD::SQLite));
-require_git('2.6'); # for v2
-require_mods(qw(File::FcntlLock)) if $^O !~ /\A(?:linux|freebsd)\z/;
+my $uuidgen = require_cmd('uuidgen');
+my $mpop = require_cmd('mpop');
+require_mods(qw(DBD::SQLite :fcntl_lock));
+require_git(v2.6); # for v2
 
 my ($tmpdir, $for_destroy) = tmpdir();
 my $cfg = "$tmpdir/cfg";
@@ -41,8 +41,7 @@ chomp(my $uuid = xqx([$uuidgen]));
 make_path("$tmpdir/home/.config/mpop",
         map { "$tmpdir/md/$_" } qw(new cur tmp));
 
-SKIP: {
-        my $mpop = which('mpop') or skip('mpop(1) missing', 1);
+{
         open my $fh, '>', "$tmpdir/home/.config/mpop/config"
                 or xbail "open $!";
         chmod 0600, $fh;
@@ -53,7 +52,7 @@ delivery maildir $tmpdir/md
 account default
 host ${\$sock->sockhost}
 port ${\$sock->sockport}
-user $uuid\@$newsgroup
+user $uuid\@$newsgroup?limit=10000
 auth user
 password anonymous
 received_header off
@@ -65,7 +64,7 @@ EOM
         my $pid = spawn($cmd, undef, { 1 => 2 });
         $pids{$pid} = $cmd;
 }
-
+diag "mpop is writing to $tmpdir/md ...";
 while (scalar keys %pids) {
         my $pid = waitpid(-1, 0) or next;
         my $cmd = delete $pids{$pid} or next;