From 01a64ffdbad34b4bf0693096382c44e3107ba690 Mon Sep 17 00:00:00 2001 From: Yuchen Liang <70461588+yliang412@users.noreply.github.com> Date: Sat, 11 Jan 2025 14:15:25 -0500 Subject: [PATCH] test(p0): add more elements into the list increase ConcurrentReadTest runtime (#796) Signed-off-by: Yuchen Liang --- test/primer/skiplist_test.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/primer/skiplist_test.cpp b/test/primer/skiplist_test.cpp index 535c4c223..8ea380024 100644 --- a/test/primer/skiplist_test.cpp +++ b/test/primer/skiplist_test.cpp @@ -332,7 +332,9 @@ TEST(SkipListTest, ConcurrentReadTest) { std::vector threads; threads.reserve(num_threads); - const int total_num_elements = num_threads * 8192; + // Note: you might want to first try use a smaller number of elements + // if you are running this test on local machine. + const int total_num_elements = num_threads * 100000; auto list = std::make_unique>(); // Insert some elements into the skip list for (int i = 0; i < total_num_elements; ++i) { @@ -347,6 +349,7 @@ TEST(SkipListTest, ConcurrentReadTest) { }; // Launch threads to perform concurrent reads + // Note: You will see a timeout if your reads cannot share access to the skip list for (int i = 0; i < num_threads; ++i) { threads.emplace_back(read_task, 0, total_num_elements); }