From dc747483dddd0092cf756c6d013cf4b6ff524d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Sat, 19 Apr 2025 20:02:09 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-tests:=20=D0=BF=D1=80=D0=B8=D0=B2=D1=8F?= =?UTF-8?q?=D0=B7=D0=BA=D0=B0=20=D0=BA=D0=BE=D0=BB-=D0=B2=D0=B0=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D0=BA=D0=BE=D0=B2/=D0=BF=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D0=BE=D0=BA=20=D0=BA=20=D0=BA=D0=BE=D0=BB-=D0=B2?= =?UTF-8?q?=D1=83=20=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D1=81=D1=81=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B2=20extra/cursor-closing.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/extra/cursor_closing.c++ | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/extra/cursor_closing.c++ b/test/extra/cursor_closing.c++ index 5cfbc09b..8ea177e4 100644 --- a/test/extra/cursor_closing.c++ +++ b/test/extra/cursor_closing.c++ @@ -318,11 +318,11 @@ bool case1(mdbx::env env) { std::deque dbi; std::vector cursors; #if defined(__cpp_lib_latch) && __cpp_lib_latch >= 201907L - static const auto N = 10; + static const auto N = std::thread::hardware_concurrency(); #else - static const auto N = 3; + static const auto N = 3u; #endif - for (auto t = 0; t < N; ++t) { + for (auto t = 0u; t < N; ++t) { auto txn = env.start_write(); auto table = txn.create_map(std::to_string(t), mdbx::key_mode::ordinal, mdbx::value_mode::multi_samelength); auto cursor = txn.open_cursor(table); @@ -337,7 +337,7 @@ bool case1(mdbx::env env) { #if defined(__cpp_lib_latch) && __cpp_lib_latch >= 201907L std::latch s(1); std::vector threads; - for (auto t = 1; t < N; ++t) { + for (auto t = 1u; t < cursors.size(); ++t) { case1_cycle_dbi(dbi); threads.push_back(std::thread([&, t]() { s.wait();