From 9525e37651ac50352f8fb9869f55ce7b01a4175b Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Fri, 1 Apr 2022 08:44:59 +0000 Subject: [PATCH] 256K for 1.5G data --- source/libs/tdb/test/tdbTest.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/libs/tdb/test/tdbTest.cpp b/source/libs/tdb/test/tdbTest.cpp index f98eff7e5b..9e1277a53d 100644 --- a/source/libs/tdb/test/tdbTest.cpp +++ b/source/libs/tdb/test/tdbTest.cpp @@ -118,10 +118,10 @@ TEST(tdb_test, simple_test) { TENV *pEnv; TDB *pDb; FKeyComparator compFunc; - int nData = 1000000; + int nData = 50000000; // Open Env - ret = tdbEnvOpen("tdb", 4096, 8192, &pEnv); + ret = tdbEnvOpen("tdb", 4096, 64, &pEnv); GTEST_ASSERT_EQ(ret, 0); // Create a database @@ -149,6 +149,8 @@ TEST(tdb_test, simple_test) { } } + tdbCommit(pEnv); + { // Query the data void *pVal = NULL; int vLen; @@ -158,6 +160,7 @@ TEST(tdb_test, simple_test) { sprintf(val, "value%d", i); ret = tdbDbGet(pDb, key, strlen(key), &pVal, &vLen); + ASSERT(ret == 0); GTEST_ASSERT_EQ(ret, 0); GTEST_ASSERT_EQ(vLen, strlen(val)); -- GitLab