about summary refs log tree commit homepage
path: root/t/xcpdb-reshard.t
diff options
context:
space:
mode:
Diffstat (limited to 't/xcpdb-reshard.t')
-rw-r--r--t/xcpdb-reshard.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t
index 1eae234d..2a0aeb45 100644
--- a/t/xcpdb-reshard.t
+++ b/t/xcpdb-reshard.t
@@ -8,6 +8,7 @@ require_mods(qw(DBD::SQLite Search::Xapian));
 require_git('2.6');
 use PublicInbox::MIME;
 use PublicInbox::InboxWritable;
+use PublicInbox::Search;
 
 my $mime = PublicInbox::MIME->create(
         header => [
@@ -61,8 +62,9 @@ for my $R (qw(2 4 1 3 3)) {
         # ensure docids in Xapian match NNTP article numbers
         my $tot = 0;
         my %tmp = %nums;
+        my $XapianDatabase = $PublicInbox::Search::X{Database};
         foreach my $d (@new_shards) {
-                my $xdb = Search::Xapian::Database->new($d);
+                my $xdb = $XapianDatabase->new($d);
                 $tot += $xdb->get_doccount;
                 my $it = $xdb->postlist_begin('');
                 my $end = $xdb->postlist_end('');