fix: fix mock issue
This commit is contained in:
parent
5afa3f9636
commit
eb98f6fd68
|
@ -166,10 +166,13 @@ class MockCatalogServiceImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t catalogGetDnodeList(SArray** pDnodes) const {
|
int32_t catalogGetDnodeList(SArray** pDnodes) const {
|
||||||
*pDnodes = taosArrayInit(dnode_.size(), sizeof(SEpSet));
|
SMetaRes res = {0};
|
||||||
|
res.pRes = taosArrayInit(dnode_.size(), sizeof(SEpSet));
|
||||||
for (const auto& dnode : dnode_) {
|
for (const auto& dnode : dnode_) {
|
||||||
taosArrayPush(*pDnodes, &dnode.second);
|
taosArrayPush((SArray*)res.pRes, &dnode.second);
|
||||||
}
|
}
|
||||||
|
*pDnodes = taosArrayInit(1, sizeof(SMetaRes));
|
||||||
|
taosArrayPush(*pDnodes, &res);
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue