X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Freplace.t;h=0e1213993f0a80f6842cb21cc18c5f7ab3899bdc;hb=169cb094abc6477cc38cc0eb0e2467a088e4068a;hp=95241adf6842282eae8b4ce805d42b79ec8c5c02;hpb=934fea5e3b3c4c1ef0cef29477941ebfc44ff7e0;p=public-inbox.git
diff --git a/t/replace.t b/t/replace.t
index 95241adf..0e121399 100644
--- a/t/replace.t
+++ b/t/replace.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 all contributors
+# Copyright (C) 2019-2021 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -20,6 +20,7 @@ sub test_replace ($$$) {
inboxdir => "$tmpdir/testbox",
name => $this,
version => $v,
+ -no_fsync => 1,
-primary_address => 'test@example.com',
indexlevel => $level,
});
@@ -48,7 +49,7 @@ EOF
$im->done;
my $thread_a = $ibx->over->get_thread('replace@example.com');
- my %before = map {; delete($_->{blob}) => $_ } @{$ibx->recent};
+ my %before = map {; delete($_->{blob}) => $_ } @{$ibx->over->recent};
my $reject = PublicInbox::Eml->new($orig->as_string);
foreach my $mid (['', ''],
[], ['']) {
@@ -74,7 +75,7 @@ EOF
for my $tip (@$cmts) {
next if !defined $tip;
$changed_epochs++;
- like($tip, qr/\A[a-f0-9]{40}\z/,
+ like($tip, qr/\A[a-f0-9]{40,}\z/,
'replace returned current commit');
}
is($changed_epochs, 1, 'only one epoch changed');
@@ -125,7 +126,7 @@ EOF
}
# check overview matches:
- my %after = map {; delete($_->{blob}) => $_ } @{$ibx->recent};
+ my %after = map {; delete($_->{blob}) => $_ } @{$ibx->over->recent};
my @before_blobs = keys %before;
foreach my $blob (@before_blobs) {
delete $before{$blob} if delete $after{$blob};
@@ -186,8 +187,7 @@ test_replace(2, 'basic', $opt = { %$opt, post => \&pad_msgs });
test_replace(2, 'basic', $opt = { %$opt, rotate_bytes => 1 });
SKIP: {
- require PublicInbox::Search;
- PublicInbox::Search::load_xapian() or skip 'Search::Xapian missing', 8;
+ require_mods(qw(Search::Xapian), 8);
for my $l (qw(medium)) {
test_replace(2, $l, {});
$opt = { pre => \&pad_msgs };