X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fxcpdb-reshard.t;h=1835fa62140f1e492c1fd1079855006a729602f6;hb=6e2da35b9e9e5510e3156b07e91ebc835146758c;hp=58932fc2ae87b8bf54973c07c11f42e7b77811c9;hpb=95bdac7f09c69036efed537a4d03d5bdd2ae4eb6;p=public-inbox.git diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t index 58932fc2..1835fa62 100644 --- a/t/xcpdb-reshard.t +++ b/t/xcpdb-reshard.t @@ -6,20 +6,17 @@ use Test::More; use PublicInbox::TestCommon; require_mods(qw(DBD::SQLite Search::Xapian)); require_git('2.6'); -use PublicInbox::MIME; +use PublicInbox::Eml; use PublicInbox::InboxWritable; require PublicInbox::Search; -my $mime = PublicInbox::MIME->create( - header => [ - From => 'a@example.com', - To => 'test@example.com', - Subject => 'this is a subject', - Date => 'Fri, 02 Oct 1993 00:00:00 +0000', - ], - body => '', -); +my $mime = PublicInbox::Eml->new(<<'EOF'); +From: a@example.com +To: test@example.com +Subject: this is a subject +Date: Fri, 02 Oct 1993 00:00:00 +0000 +EOF my ($this) = (split('/', $0))[-1]; my ($tmpdir, $for_destroy) = tmpdir(); local $ENV{PI_CONFIG} = "$tmpdir/config"; @@ -33,7 +30,7 @@ my $ibx = PublicInbox::Inbox->new({ my @xcpdb = qw(-xcpdb -q); my $nproc = 8; my $ndoc = 13; -my $im = PublicInbox::InboxWritable->new($ibx, {nproc => $nproc})->importer(1); +my $im = PublicInbox::InboxWritable->new($ibx, {nproc => $nproc})->importer; for my $i (1..$ndoc) { $mime->header_set('Message-ID', ""); ok($im->add($mime), "message $i added");