From db83bd34d2d0d0c8c65512c4d0fe374605eb1d6c 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: Sun, 4 Dec 2022 18:08:06 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-test:=20=D1=87=D1=82=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B0=D0=BA=D1=82=D1=83=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B?= =?UTF-8?q?=D1=85=20=D1=84=D0=BB=D0=B0=D0=B3=D0=BE=D0=B2=20=D1=80=D0=B5?= =?UTF-8?q?=D0=B6=D0=B8=D0=BC=D0=B0=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B?= =?UTF-8?q?=20=D0=91=D0=94.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/test.c++ | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/test.c++ b/test/test.c++ index 1d06dd77..c42b598f 100644 --- a/test/test.c++ +++ b/test/test.c++ @@ -158,12 +158,17 @@ void testcase::db_open() { if (config.params.random_writemap && flipcoin()) mode ^= MDBX_WRITEMAP; - actual_env_mode = mode; int rc = mdbx_env_open(db_guard.get(), config.params.pathname_db.c_str(), mode, 0640); if (unlikely(rc != MDBX_SUCCESS)) failure_perror("mdbx_env_open()", rc); + unsigned env_flags_proxy; + rc = mdbx_env_get_flags(db_guard.get(), &env_flags_proxy); + if (unlikely(rc != MDBX_SUCCESS)) + failure_perror("mdbx_env_get_flags()", rc); + actual_env_mode = MDBX_env_flags_t(env_flags_proxy); + rc = mdbx_env_set_syncperiod(db_guard.get(), unsigned(0.042 * 65536)); if (unlikely(rc != MDBX_SUCCESS) && rc != MDBX_BUSY) failure_perror("mdbx_env_set_syncperiod()", rc);