feature/qnode
This commit is contained in:
parent
26c2f31341
commit
504d21553e
|
@ -839,7 +839,7 @@ TEST(tableMeta, normalTable) {
|
|||
ASSERT_EQ(vgInfo.epset.numOfEps, 3);
|
||||
|
||||
while (0 == ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_DB_NUM)) {
|
||||
usleep(100);
|
||||
usleep(10000);
|
||||
}
|
||||
|
||||
ctgTestSetRspTableMeta();
|
||||
|
@ -856,8 +856,13 @@ TEST(tableMeta, normalTable) {
|
|||
ASSERT_EQ(tableMeta->tableInfo.precision, 1);
|
||||
ASSERT_EQ(tableMeta->tableInfo.rowSize, 12);
|
||||
|
||||
while (0 == ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM)) {
|
||||
usleep(100);
|
||||
while (true) {
|
||||
uint32_t n = ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM);
|
||||
if (0 == n) {
|
||||
usleep(10000);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -946,10 +951,16 @@ TEST(tableMeta, childTableCase) {
|
|||
ASSERT_EQ(tableMeta->tableInfo.precision, 1);
|
||||
ASSERT_EQ(tableMeta->tableInfo.rowSize, 12);
|
||||
|
||||
while (0 == ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM)) {
|
||||
usleep(100);
|
||||
while (true) {
|
||||
uint32_t n = ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM);
|
||||
if (0 == n) {
|
||||
usleep(10000);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tableMeta = NULL;
|
||||
code = catalogGetTableMeta(pCtg, mockPointer, (const SEpSet *)mockPointer, &n, &tableMeta);
|
||||
ASSERT_EQ(code, 0);
|
||||
|
@ -1049,10 +1060,16 @@ TEST(tableMeta, superTableCase) {
|
|||
ASSERT_EQ(tableMeta->tableInfo.precision, 1);
|
||||
ASSERT_EQ(tableMeta->tableInfo.rowSize, 12);
|
||||
|
||||
while (0 == ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM)) {
|
||||
usleep(100);
|
||||
while (true) {
|
||||
uint32_t n = ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM);
|
||||
if (0 == n) {
|
||||
usleep(10000);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ctgTestSetRspCTableMeta();
|
||||
|
||||
tableMeta = NULL;
|
||||
|
@ -1070,10 +1087,16 @@ TEST(tableMeta, superTableCase) {
|
|||
ASSERT_EQ(tableMeta->tableInfo.precision, 1);
|
||||
ASSERT_EQ(tableMeta->tableInfo.rowSize, 12);
|
||||
|
||||
while (2 != ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM)) {
|
||||
usleep(100);
|
||||
while (true) {
|
||||
uint32_t n = ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM);
|
||||
if (2 != n) {
|
||||
usleep(10000);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tableMeta = NULL;
|
||||
code = catalogRefreshGetTableMeta(pCtg, mockPointer, (const SEpSet *)mockPointer, &n, &tableMeta, 0);
|
||||
ASSERT_EQ(code, 0);
|
||||
|
@ -1162,17 +1185,30 @@ TEST(tableMeta, rmStbMeta) {
|
|||
ASSERT_EQ(tableMeta->tableInfo.precision, 1);
|
||||
ASSERT_EQ(tableMeta->tableInfo.rowSize, 12);
|
||||
|
||||
while (0 == ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM)) {
|
||||
usleep(100);
|
||||
while (true) {
|
||||
uint32_t n = ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM);
|
||||
if (0 == n) {
|
||||
usleep(10000);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
code = catalogRemoveStbMeta(pCtg, "1.db1", ctgTestDbId, ctgTestSTablename, ctgTestSuid);
|
||||
ASSERT_EQ(code, 0);
|
||||
|
||||
while (ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM) || ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_STB_RENT_NUM)) {
|
||||
usleep(100);
|
||||
while (true) {
|
||||
int32_t n = ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM);
|
||||
int32_t m = ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_STB_RENT_NUM);
|
||||
if (n || m) {
|
||||
usleep(10000);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ASSERT_EQ(ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_DB_NUM), 1);
|
||||
ASSERT_EQ(ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM), 0);
|
||||
ASSERT_EQ(ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_STB_NUM), 0);
|
||||
|
@ -1219,10 +1255,16 @@ TEST(tableMeta, updateStbMeta) {
|
|||
ASSERT_EQ(tableMeta->tableInfo.precision, 1);
|
||||
ASSERT_EQ(tableMeta->tableInfo.rowSize, 12);
|
||||
|
||||
while (0 == ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM)) {
|
||||
usleep(100);
|
||||
while (true) {
|
||||
uint32_t n = ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM);
|
||||
if (0 == n) {
|
||||
usleep(10000);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tfree(tableMeta);
|
||||
|
||||
STableMetaRsp rsp = {0};
|
||||
|
@ -1235,7 +1277,7 @@ TEST(tableMeta, updateStbMeta) {
|
|||
uint64_t n = 0;
|
||||
ctgDbgGetStatNum("runtime.qDoneNum", (void *)&n);
|
||||
if (n != 3) {
|
||||
usleep(100);
|
||||
usleep(10000);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -1438,7 +1480,7 @@ TEST(dbVgroup, getSetDbVgroupCase) {
|
|||
ASSERT_EQ(taosArrayGetSize((const SArray *)vgList), ctgTestVgNum);
|
||||
|
||||
while (0 == ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_DB_NUM)) {
|
||||
usleep(100);
|
||||
usleep(10000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1463,7 +1505,7 @@ TEST(dbVgroup, getSetDbVgroupCase) {
|
|||
uint64_t n = 0;
|
||||
ctgDbgGetStatNum("runtime.qDoneNum", (void *)&n);
|
||||
if (n != 3) {
|
||||
usleep(100);
|
||||
usleep(10000);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -1691,7 +1733,7 @@ TEST(rentTest, allRent) {
|
|||
ASSERT_EQ(tableMeta->tableInfo.rowSize, 12);
|
||||
|
||||
while (ctgDbgGetClusterCacheNum(pCtg, CTG_DBG_META_NUM) < i) {
|
||||
usleep(100);
|
||||
usleep(10000);
|
||||
}
|
||||
|
||||
code = catalogGetExpiredDBs(pCtg, &dbs, &num);
|
||||
|
|
Loading…
Reference in New Issue