refactor code
This commit is contained in:
parent
b4bd6a4f1c
commit
c7602a4c1a
|
@ -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")
|
||||||
|
|
||||||
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 @@
|
||||||
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) {
|
||||||
// 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();
|
||||||
|
// }
|
Loading…
Reference in New Issue