From 08ae11cf1fc7aab87e3514283845a2d70eb7b9e4 Mon Sep 17 00:00:00 2001 From: Kishore Nallan Date: Thu, 26 Jan 2023 19:33:47 +0530 Subject: [PATCH] Fix test. --- test/collection_specific_more_test.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/collection_specific_more_test.cpp b/test/collection_specific_more_test.cpp index 5a3e16fe..a8b3eaa6 100644 --- a/test/collection_specific_more_test.cpp +++ b/test/collection_specific_more_test.cpp @@ -1859,12 +1859,13 @@ TEST_F(CollectionSpecificMoreTest, SearchCutoffTest) { ASSERT_TRUE(coll1->add(doc.dump()).ok()); } - auto res = coll1->search("1 2", {"title"}, "", {}, {}, {0}, 3, 1, FREQUENCY, {false}, 5, - spp::sparse_hash_set(), - spp::sparse_hash_set(), 10, "", 30, 4, "title", 20, {}, {}, {}, 0, - "", "", {}, 1000, true, false, true, "", false, 1).get(); + auto coll_op = coll1->search("1 2", {"title"}, "", {}, {}, {0}, 3, 1, FREQUENCY, {false}, 5, + spp::sparse_hash_set(), + spp::sparse_hash_set(), 10, "", 30, 4, "title", 20, {}, {}, {}, 0, + "", "", {}, 1000, true, false, true, "", false, 1); - ASSERT_TRUE(res["search_cutoff"].get()); + ASSERT_FALSE(coll_op.ok()); + ASSERT_EQ("Site is overloaded", coll_op.error()); } TEST_F(CollectionSpecificMoreTest, CrossFieldTypoAndPrefixWithWeights) {