about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-11-24 00:22:24 +0000
committerEric Wong <e@80x24.org>2019-11-24 21:34:23 +0000
commit08071ffbd957c13df35979ac88711ed9040b863a (patch)
tree156175d3a833cc263e1fd39769415317be9e85da /t
parentd454d3467b99ad838c4f7fd143360a391b432b5b (diff)
downloadpublic-inbox-08071ffbd957c13df35979ac88711ed9040b863a.tar.gz
We did not have a test for this, and need to guard against
regressions when changing Xapcmd to use File::Temp->newdir
in future commits.
Diffstat (limited to '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 88e6c3dc..9335843d 100644
--- a/t/xcpdb-reshard.t
+++ b/t/xcpdb-reshard.t
@@ -50,7 +50,9 @@ my %nums = map {; "$_->{num}" => 1 } @$orig;
 # ensure we can go up or down in shards, or stay the same:
 for my $R (qw(2 4 1 3 3)) {
         delete $ibx->{search}; # release old handles
-        ok(run_script([@xcpdb, "-R$R", $ibx->{inboxdir}]), "xcpdb -R$R");
+        my $cmd = [@xcpdb, "-R$R", $ibx->{inboxdir}];
+        push @$cmd, '--compact' if $R == 1;
+        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');