X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=xt%2Fcreate-many-inboxes.t;h=d22803e3c2746a6d6898843448cf79958114cc8c;hb=d323a16ced5e3a77136a1ebca4a2f7d5678121c4;hp=c92643b2d33eb26a803113a0fc1231ad50e94275;hpb=052b9762f82c119f272c3ab8334773bd9c1c5b25;p=public-inbox.git
diff --git a/xt/create-many-inboxes.t b/xt/create-many-inboxes.t
index c92643b2..d22803e3 100644
--- a/xt/create-many-inboxes.t
+++ b/xt/create-many-inboxes.t
@@ -1,10 +1,11 @@
#!perl -w
-# Copyright (C) 2020 all contributors
+# Copyright (C) 2020-2021 all contributors
# License: AGPL-3.0+
use strict;
-use Test::More;
+use v5.10.1;
use PublicInbox::TestCommon;
use PublicInbox::Eml;
+use PublicInbox::IPC;
use File::Path qw(mkpath);
use IO::Handle (); # autoflush
use POSIX qw(_exit);
@@ -21,7 +22,7 @@ require_git 2.6;
require_mods(qw(DBD::SQLite Search::Xapian));
use_ok 'PublicInbox::V2Writable';
my $nr_inbox = $ENV{NR_INBOX} // 10;
-my $nproc = $ENV{NPROC} || PublicInbox::V2Writable::detect_nproc() || 2;
+my $nproc = $ENV{NPROC} || PublicInbox::IPC::detect_nproc() || 2;
my $indexlevel = $ENV{TEST_INDEXLEVEL} // 'basic';
diag "NR_INBOX=$nr_inbox NPROC=$nproc TEST_INDEXLEVEL=$indexlevel";
diag "TEST_MANY_ROOT=$many_root";
@@ -39,6 +40,7 @@ my $v2_init_add = sub {
address => [ "test-$i\@example.com" ],
url => [ "//example.com/test-$i" ],
version => 2,
+ -no_fsync => 1,
});
$ibx->{indexlevel} = $indexlevel if $level_cfg ne '';
my $entry = <) {
@@ -77,7 +79,6 @@ for my $i (1..$nproc) {
}
_exit(0);
}
- defined $pid or BAIL_OUT "fork: $!";
close $r or BAIL_OUT $!;
push @children, [ $w, $pid ];
$w->autoflush(1);