From 0da60628023056c1b7bcab9660bbebd0d3d61d9e Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Sat, 9 Mar 2024 19:33:23 +0100 Subject: Early exit on fatal failure in sharded hash map unit test. --- .../src/tests/datastore/sharded_hash_map/sharded_hash_map_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vespalib/src/tests/datastore/sharded_hash_map/sharded_hash_map_test.cpp b/vespalib/src/tests/datastore/sharded_hash_map/sharded_hash_map_test.cpp index 08b9b96e202..6b4aa51a481 100644 --- a/vespalib/src/tests/datastore/sharded_hash_map/sharded_hash_map_test.cpp +++ b/vespalib/src/tests/datastore/sharded_hash_map/sharded_hash_map_test.cpp @@ -306,7 +306,7 @@ void DataStoreShardedHashTest::test_normalize_values(bool use_filter, bool one_filter) { populate_sample_data(large_population); - populate_sample_values(large_population); + ASSERT_NO_FATAL_FAILURE(populate_sample_values(large_population)); if (use_filter) { auto filter = make_entry_ref_filter(one_filter); EXPECT_TRUE(_hash_map.normalize_values([](std::vector &refs) noexcept { for (auto &ref : refs) { RefT iref(ref); ref = RefT(iref.offset() + 300, iref.bufferId()); } }, filter)); @@ -332,7 +332,7 @@ void DataStoreShardedHashTest::test_foreach_value(bool one_filter) { populate_sample_data(large_population); - populate_sample_values(large_population); + ASSERT_NO_FATAL_FAILURE(populate_sample_values(large_population)); auto filter = make_entry_ref_filter(one_filter); std::vector exp_refs; @@ -340,7 +340,7 @@ DataStoreShardedHashTest::test_foreach_value(bool one_filter) std::vector act_refs; _hash_map.foreach_value([&act_refs](const std::vector &refs) { act_refs.insert(act_refs.end(), refs.begin(), refs.end()); }, filter); EXPECT_EQ(exp_refs, act_refs); - clear_sample_values(large_population); + ASSERT_NO_FATAL_FAILURE(clear_sample_values(large_population)); } TEST_F(DataStoreShardedHashTest, single_threaded_reader_without_updates) -- cgit v1.2.3