From 9549d93260ec25df50b5e91bfa6045b451397357 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sun, 13 Feb 2022 03:08:39 -0800 Subject: [PATCH] Improved recall test --- test/t/003_recall.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/t/003_recall.pl b/test/t/003_recall.pl index c7ce251..dc8d6e7 100644 --- a/test/t/003_recall.pl +++ b/test/t/003_recall.pl @@ -7,6 +7,7 @@ use Test::More tests => 3; my $node; my @queries = (); my @expected = (); +my $limit = 30; sub test_recall { @@ -18,7 +19,7 @@ sub test_recall my $actual = $node->safe_psql("postgres", qq( SET enable_seqscan = off; SET ivfflat.probes = $probes; - SELECT i FROM tst ORDER BY v <-> '$queries[$i]' LIMIT 10; + SELECT i FROM tst ORDER BY v <-> '$queries[$i]' LIMIT $limit; )); my @actual_ids = split("\n", $actual); my %actual_set = map { $_ => 1 } @actual_ids; @@ -58,7 +59,7 @@ for (1..20) { # Get exact results foreach (@queries) { - my $res = $node->safe_psql("postgres", "SELECT i FROM tst ORDER BY v <-> '$_' LIMIT 10;"); + my $res = $node->safe_psql("postgres", "SELECT i FROM tst ORDER BY v <-> '$_' LIMIT $limit;"); push(@expected, $res); }