about summary refs log tree commit homepage
path: root/t/xcpdb-reshard.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-09-02 11:04:16 +0000
committerEric Wong <e@80x24.org>2020-09-03 20:11:03 +0000
commit80b887f29b2ec71d025b4c266a1c26314758994c (patch)
tree31f9937daf20c21b33c0407763bf2d6bd06d2f66 /t/xcpdb-reshard.t
parent851aa7183cf2b152d7ff187729bc896597d22fad (diff)
downloadpublic-inbox-80b887f29b2ec71d025b4c266a1c26314758994c.tar.gz
search: replace ->query with ->mset
Nearly all of the search uses in the production code rely on
a Xapian mset iterator being returned (instead of an array
of $smsg objects).  So default to returning the mset and move
the burden of smsg array conversion into the test cases.
Diffstat (limited to 't/xcpdb-reshard.t')
-rw-r--r--t/xcpdb-reshard.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t
index 1835fa62..c1af5d9a 100644
--- a/t/xcpdb-reshard.t
+++ b/t/xcpdb-reshard.t
@@ -49,7 +49,8 @@ for my $R (qw(2 4 1 3 3)) {
         ok(run_script($cmd), "xcpdb -R$R");
         my @new_shards = grep(m!/\d+\z!, glob("$ibx->{inboxdir}/xap*/*"));
         is(scalar(@new_shards), $R, 'resharded to two shards');
-        my $msgs = $ibx->search->query('s:this');
+        my $mset = $ibx->search->mset('s:this');
+        my $msgs = $ibx->search->mset_to_smsg($ibx, $mset);
         is(scalar(@$msgs), $ndoc, 'got expected docs after resharding');
         my %by_mid = map {; "$_->{mid}" => $_ } @$msgs;
         ok($by_mid{"m$_\@example.com"}, "$_ exists") for (1..$ndoc);