提交 1ccf9ed4 编写于 作者: A Alex Duan

test: add cluster global tdDnodes

上级 9e8cc7d1
...@@ -859,5 +859,15 @@ class TDDnodes: ...@@ -859,5 +859,15 @@ class TDDnodes:
def getAsan(self): def getAsan(self):
return self.asan return self.asan
global tdDnodes
tdDnodes = TDDnodes() tdDnodes = TDDnodes()
# global get
def tdDnodes_Get():
global tdDnodes
return tdDnodes
# global set
def tdDnodes_Set(newInst):
global tdDnodes
tdDnodes = newInst
\ No newline at end of file
...@@ -385,6 +385,8 @@ if __name__ == "__main__": ...@@ -385,6 +385,8 @@ if __name__ == "__main__":
tdLog.debug("create an cluster with %s nodes and make %s dnode as independent mnode"%(dnodeNums,mnodeNums)) tdLog.debug("create an cluster with %s nodes and make %s dnode as independent mnode"%(dnodeNums,mnodeNums))
dnodeslist = cluster.configure_cluster(dnodeNums=dnodeNums, mnodeNums=mnodeNums, independentMnode=independentMnode) dnodeslist = cluster.configure_cluster(dnodeNums=dnodeNums, mnodeNums=mnodeNums, independentMnode=independentMnode)
tdDnodes = ClusterDnodes(dnodeslist) tdDnodes = ClusterDnodes(dnodeslist)
# set to global
tdDnodes_Set(tdDnodes)
tdDnodes.init(deployPath, masterIp) tdDnodes.init(deployPath, masterIp)
tdDnodes.setTestCluster(testCluster) tdDnodes.setTestCluster(testCluster)
tdDnodes.setValgrind(valgrind) tdDnodes.setValgrind(valgrind)
...@@ -555,6 +557,8 @@ if __name__ == "__main__": ...@@ -555,6 +557,8 @@ if __name__ == "__main__":
tdLog.debug("create an cluster with %s nodes and make %s dnode as independent mnode"%(dnodeNums,mnodeNums)) tdLog.debug("create an cluster with %s nodes and make %s dnode as independent mnode"%(dnodeNums,mnodeNums))
dnodeslist = cluster.configure_cluster(dnodeNums=dnodeNums, mnodeNums=mnodeNums, independentMnode=independentMnode) dnodeslist = cluster.configure_cluster(dnodeNums=dnodeNums, mnodeNums=mnodeNums, independentMnode=independentMnode)
tdDnodes = ClusterDnodes(dnodeslist) tdDnodes = ClusterDnodes(dnodeslist)
# set to global
tdDnodes_Set(tdDnodes)
tdDnodes.init(deployPath, masterIp) tdDnodes.init(deployPath, masterIp)
tdDnodes.setTestCluster(testCluster) tdDnodes.setTestCluster(testCluster)
tdDnodes.setValgrind(valgrind) tdDnodes.setValgrind(valgrind)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册