From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/3] t/extindex: add --max-size test
Date: Sat, 14 Dec 2024 14:58:02 +0000 [thread overview]
Message-ID: <20241214145805.755893-2-e@80x24.org> (raw)
In-Reply-To: <20241214145805.755893-1-e@80x24.org>
I noticed this missing coverage while working on another
series of changes which aren't quite ready, yet.
---
t/extsearch.t | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/t/extsearch.t b/t/extsearch.t
index 1a212bc8..7b75c208 100644
--- a/t/extsearch.t
+++ b/t/extsearch.t
@@ -703,4 +703,16 @@ EOF
is $args[0]->size, 0, 'isrch->async_mset altid miss works';
}
+if ('max-size') {
+ my $dir = "$home/extindex-max";
+ my $rdr = { 2 => \(my $err) };
+ ok run_script([qw(-extindex --max-size=500 --all -vvv), $dir],
+ undef, $rdr), 'extindex with max-size';
+ my $es = PublicInbox::ExtSearch->new($dir);
+ my $mset = $es->mset('z:500..');
+ is $mset->size, 0, 'no hits w/ max-size=500';
+ like $err, qr/ skipping [a-f0-9]{40,} .*? > 500\b/,
+ 'noted skipping messages in stderr';
+}
+
done_testing;
next prev parent reply other threads:[~2024-12-14 14:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-14 14:58 [PATCH 0/3] indexing odds and ends Eric Wong
2024-12-14 14:58 ` Eric Wong [this message]
2024-12-14 14:58 ` [PATCH 2/3] admin: common warn_cb Eric Wong
2024-12-14 14:58 ` [PATCH 3/3] lei: use PublicInbox::Eml::warn_ignore_cb Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241214145805.755893-2-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).