From f9d1726c890471b0f0339e560ac76189134f3434 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 25 Nov 2022 23:27:36 +0800 Subject: [PATCH] fix(query): fix error in ut. --- include/util/thash.h | 2 +- source/dnode/mgmt/test/sut/src/client.cpp | 1 + source/libs/parser/test/mockCatalogService.cpp | 2 +- source/libs/scheduler/test/schedulerTests.cpp | 1 + source/libs/transport/test/transUT.cpp | 2 ++ source/util/src/thash.c | 2 +- 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/util/thash.h b/include/util/thash.h index a04f78a3d1..08caad495d 100644 --- a/include/util/thash.h +++ b/include/util/thash.h @@ -213,7 +213,7 @@ void taosHashSetEqualFp(SHashObj *pHashObj, _equal_fn_t fp); */ void taosHashSetFreeFp(SHashObj *pHashObj, _hash_free_fn_t fp); -//int64_t taosHashGetCompTimes(SHashObj *pHashObj); +int64_t taosHashGetCompTimes(SHashObj *pHashObj); #ifdef __cplusplus } diff --git a/source/dnode/mgmt/test/sut/src/client.cpp b/source/dnode/mgmt/test/sut/src/client.cpp index 6b4c23c0de..a27a511651 100644 --- a/source/dnode/mgmt/test/sut/src/client.cpp +++ b/source/dnode/mgmt/test/sut/src/client.cpp @@ -15,6 +15,7 @@ #include "sut.h" #include "tdatablock.h" +#include "tmisce.h" static void processClientRsp(void* parent, SRpcMsg* pRsp, SEpSet* pEpSet) { TestClient* client = (TestClient*)parent; diff --git a/source/libs/parser/test/mockCatalogService.cpp b/source/libs/parser/test/mockCatalogService.cpp index 95f7af435d..be2e4b90b9 100644 --- a/source/libs/parser/test/mockCatalogService.cpp +++ b/source/libs/parser/test/mockCatalogService.cpp @@ -20,9 +20,9 @@ #include #include -#include "tdatablock.h" #include "tname.h" #include "ttypes.h" +#include "tmisce.h" std::unique_ptr g_mockCatalogService; diff --git a/source/libs/scheduler/test/schedulerTests.cpp b/source/libs/scheduler/test/schedulerTests.cpp index 97e14b617c..5605a4b842 100644 --- a/source/libs/scheduler/test/schedulerTests.cpp +++ b/source/libs/scheduler/test/schedulerTests.cpp @@ -38,6 +38,7 @@ #include "tglobal.h" #include "trpc.h" #include "tvariant.h" +#include "tmisce.h" #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wwrite-strings" diff --git a/source/libs/transport/test/transUT.cpp b/source/libs/transport/test/transUT.cpp index 92f0bf11cf..88a1e2564f 100644 --- a/source/libs/transport/test/transUT.cpp +++ b/source/libs/transport/test/transUT.cpp @@ -20,6 +20,8 @@ #include "tlog.h" #include "transLog.h" #include "trpc.h" +#include "tmisce.h" + using namespace std; const char *label = "APP"; diff --git a/source/util/src/thash.c b/source/util/src/thash.c index fe6c0a8af5..a0411483ca 100644 --- a/source/util/src/thash.c +++ b/source/util/src/thash.c @@ -889,4 +889,4 @@ void *taosHashAcquire(SHashObj *pHashObj, const void *key, size_t keyLen) { void taosHashRelease(SHashObj *pHashObj, void *p) { taosHashCancelIterate(pHashObj, p); } -//int64_t taosHashGetCompTimes(SHashObj *pHashObj) { return atomic_load_64(&pHashObj->compTimes); } +int64_t taosHashGetCompTimes(SHashObj *pHashObj) { return 0 /*atomic_load_64(&pHashObj->compTimes)*/; } -- GitLab