plan skip_all => "Xapian missing for search" if $@;
use File::Temp qw/tempdir/;
use Email::MIME;
-use Data::Dumper;
my $tmpdir = tempdir(CLEANUP => 1);
my $git_dir = "$tmpdir/a.git";
my ($root_id, $last_id);
my $rw = PublicInbox::SearchIdx->new($git_dir, 1);
my $ro = PublicInbox::Search->new($git_dir);
+$rw = undef;
my $rw_commit = sub {
+ $rw->{xdb}->commit_transaction if $rw;
$rw = undef;
$rw = PublicInbox::SearchIdx->new($git_dir, 1);
+ $rw->{xdb}->begin_transaction;
};
{
body => "goodbye forever :<\n");
my $rv;
+ $rw_commit->();
$root_id = $rw->add_message($root);
is($root_id, int($root_id), "root_id is an integer: $root_id");
$last_id = $rw->add_message($last);
ok($doc_id > 0, "doc_id defined with circular reference");
my $smsg = $rw->lookup_message('circle@a');
$smsg->ensure_metadata;
- is($smsg->references_sorted, '', "no references created");
+ is($smsg->references, '', "no references created");
}
done_testing();