From 37fb4200823f0de19bf4d0e2155a0049463c37a5 Mon Sep 17 00:00:00 2001 From: Eddy Ashton Date: Wed, 13 Nov 2024 10:28:44 +0000 Subject: [PATCH] Increase number of writes in concurrency test to ensure conflict --- src/kv/test/kv_contention.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kv/test/kv_contention.cpp b/src/kv/test/kv_contention.cpp index 62a4178b2244..272933ec38e7 100644 --- a/src/kv/test/kv_contention.cpp +++ b/src/kv/test/kv_contention.cpp @@ -252,6 +252,8 @@ DOCTEST_TEST_CASE("Concurrent kv access" * doctest::test_suite("concurrency")) DOCTEST_TEST_CASE( "get_version_of_previous_write ordering" * doctest::test_suite("concurrency")) { + ccf::logger::config::level() = LoggerLevel::INFO; + // Many threads attempt to produce a chain of transactions pointing at the // previous write to a single key, at that key. ccf::kv::Store kv_store; @@ -315,7 +317,7 @@ DOCTEST_TEST_CASE( std::vector threads; constexpr auto num_threads = 64; - constexpr auto writes_per_thread = 10; + constexpr auto writes_per_thread = 100; for (size_t i = 0; i < num_threads; ++i) { threads.emplace_back([&]() { @@ -331,6 +333,7 @@ DOCTEST_TEST_CASE( thread.join(); } + LOG_INFO_FMT("Found {} conflicts", conflict_count); DOCTEST_CHECK(conflict_count > 0); constexpr auto last_write_version = num_threads * writes_per_thread;