提交 c7602a4c 编写于 作者: dengyihao's avatar dengyihao

refactor code

上级 b4bd6a4f
...@@ -695,7 +695,6 @@ int32_t streamStateOpenBackendCf(void* backend, char* name, SHashObj* ids) { ...@@ -695,7 +695,6 @@ int32_t streamStateOpenBackendCf(void* backend, char* name, SHashObj* ids) {
memcpy(cfNames[0], "default", strlen("default")); memcpy(cfNames[0], "default", strlen("default"));
continue; continue;
} }
qDebug("cf name %s", idstr);
GEN_COLUMN_FAMILY_NAME(cfNames[i], idstr, ginitDict[(i - 1) % (cfLen)].key); GEN_COLUMN_FAMILY_NAME(cfNames[i], idstr, ginitDict[(i - 1) % (cfLen)].key);
if (i % cfLen == 0) { if (i % cfLen == 0) {
......
...@@ -10,7 +10,7 @@ ADD_EXECUTABLE(streamUpdateTest "tstreamUpdateTest.cpp") ...@@ -10,7 +10,7 @@ ADD_EXECUTABLE(streamUpdateTest "tstreamUpdateTest.cpp")
TARGET_LINK_LIBRARIES( TARGET_LINK_LIBRARIES(
streamUpdateTest streamUpdateTest
PUBLIC os util common gtest stream PUBLIC os util common gtest gtest_main stream
) )
TARGET_INCLUDE_DIRECTORIES( TARGET_INCLUDE_DIRECTORIES(
......
...@@ -6,6 +6,25 @@ ...@@ -6,6 +6,25 @@
using namespace std; using namespace std;
#define MAX_NUM_SCALABLE_BF 100000 #define MAX_NUM_SCALABLE_BF 100000
class StreamStateEnv : public ::testing::Test {
protected:
virtual void SetUp() {
// initLog();
// taosRemoveDir(path);
// SIndexOpts opts;
// opts.cacheSize = 1024 * 1024 * 4;
// int ret = indexOpen(&opts, path, &index);
// assert(ret == 0);
}
virtual void TearDown() {
// indexClose(index);
}
const char *path = TD_TMP_DIR_PATH "stream";
// SIndexOpts* opts;
// SIndex* index;
};
bool equalSBF(SScalableBf *left, SScalableBf *right) { bool equalSBF(SScalableBf *left, SScalableBf *right) {
if (left->growth != right->growth) return false; if (left->growth != right->growth) return false;
if (left->numBits != right->numBits) return false; if (left->numBits != right->numBits) return false;
...@@ -191,8 +210,9 @@ TEST(TD_STREAM_UPDATE_TEST, update) { ...@@ -191,8 +210,9 @@ TEST(TD_STREAM_UPDATE_TEST, update) {
// updateInfoDestroy(pSU6); // updateInfoDestroy(pSU6);
// updateInfoDestroy(pSU7); // updateInfoDestroy(pSU7);
} }
// TEST()
int main(int argc, char *argv[]) { TEST_F(StreamStateEnv, test1) {}
testing::InitGoogleTest(&argc, argv); // int main(int argc, char *argv[]) {
return RUN_ALL_TESTS(); // testing::InitGoogleTest(&argc, argv);
} // return RUN_ALL_TESTS();
\ No newline at end of file // }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册