From 5616c1d7a7aa476d8880c0609907e3a157bd78be Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Fri, 11 Aug 2023 19:16:08 -0700 Subject: [PATCH] Simplified TAP tests [skip ci] --- test/t/012_hnsw_build_recall.pl | 10 ++-------- test/t/013_hnsw_insert_recall.pl | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/test/t/012_hnsw_build_recall.pl b/test/t/012_hnsw_build_recall.pl index 22dcac7..40baae6 100644 --- a/test/t/012_hnsw_build_recall.pl +++ b/test/t/012_hnsw_build_recall.pl @@ -92,14 +92,8 @@ foreach (@operators) } $node->safe_psql("postgres", "CREATE INDEX ON tst USING hnsw (v $opclass);"); - if ($operator eq "<#>") - { - test_recall(0.80, $operator); - } - else - { - test_recall(0.99, $operator); - } + my $min = $operator eq "<#>" ? 0.80 : 0.99; + test_recall($min, $operator); } done_testing(); diff --git a/test/t/013_hnsw_insert_recall.pl b/test/t/013_hnsw_insert_recall.pl index 6ef48d9..985b476 100644 --- a/test/t/013_hnsw_insert_recall.pl +++ b/test/t/013_hnsw_insert_recall.pl @@ -104,14 +104,8 @@ foreach (@operators) push(@expected, $res); } - if ($operator eq "<#>") - { - test_recall(0.80, $operator); - } - else - { - test_recall(0.99, $operator); - } + my $min = $operator eq "<#>" ? 0.80 : 0.99; + test_recall($min, $operator); $node->safe_psql("postgres", "DROP INDEX idx;"); $node->safe_psql("postgres", "TRUNCATE tst;");