From 2b442119288c263bef2d5299512448e088d4e3c4 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 15 May 2024 14:52:59 +0800 Subject: [PATCH] fix(test): update test case and fix a typo. --- source/libs/stream/src/streamBackendRocksdb.c | 2 +- source/util/test/cfgTest.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c index b6bbe2e383..398980dfba 100644 --- a/source/libs/stream/src/streamBackendRocksdb.c +++ b/source/libs/stream/src/streamBackendRocksdb.c @@ -1974,7 +1974,7 @@ STaskDbWrapper* taskDbOpenImpl(const char* key, char* statePath, char* dbPath) { cfNames = rocksdb_list_column_families(pTaskDb->dbOpt, dbPath, &nCf, &err); if (err != NULL) { - stError("%s failed to create column-family, %s, %d, reason:%s", key, dbPath, nCf, err); + stError("%s failed to create column-family, %s, %" PRIzu ", reason:%s", key, dbPath, nCf, err); goto _EXIT; } } diff --git a/source/util/test/cfgTest.cpp b/source/util/test/cfgTest.cpp index 92422b6a80..9f8645b14c 100644 --- a/source/util/test/cfgTest.cpp +++ b/source/util/test/cfgTest.cpp @@ -67,7 +67,7 @@ TEST_F(CfgTest, 02_Basic) { SConfigItem* pItem = NULL; SConfigIter* pIter = cfgCreateIter(pConfig); - while((pItem == cfgNextIter(pIter)) != NULL) { + while((pItem = cfgNextIter(pIter)) != NULL) { switch (pItem->dtype) { case CFG_DTYPE_BOOL: printf("index:%d, cfg:%s value:%d\n", size, pItem->name, pItem->bval);