From 6b6f5aa5d1d8d132ff7635b091926ff395b0f0d2 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 27 Feb 2024 05:51:32 +0000 Subject: [PATCH] add test case --- source/libs/stream/test/backendTest.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source/libs/stream/test/backendTest.cpp b/source/libs/stream/test/backendTest.cpp index df0ab9fe7e..1ccc0b4285 100644 --- a/source/libs/stream/test/backendTest.cpp +++ b/source/libs/stream/test/backendTest.cpp @@ -72,7 +72,18 @@ void backendOpen() { SWinKey key = {.groupId = (uint64_t)(0), .ts = ts}; streamStateDel_rocksdb(p, &key); - + streamStateClear_rocksdb(p); + + for (int i = 0; i < size; i++) { + int64_t ts = tsArray[i]; + SWinKey key = {.groupId = (uint64_t)(i), .ts = ts}; + const char *val = "value data"; + int32_t len = 0; + char *newVal = NULL; + int32_t code = streamStateGet_rocksdb(p, &key, (void **)&newVal, &len); + ASSERT(code != 0); + } + tsArray.clear(); // read // iterator