未验证 提交 fbecd296 编写于 作者: H Hui Li 提交者: GitHub

Merge pull request #22115 from taosdata/test_main/lihui

test: del db and max topics invalid
......@@ -216,6 +216,32 @@ class TDTestCase:
tdLog.info("create topic sql: %s"%sqlString)
tdSql.error(sqlString)
tdLog.info("drop database when there are topic")
sqlString = "drop database %s" %(paraDict['dbName'])
tdLog.info("drop database sql: %s"%sqlString)
tdSql.error(sqlString)
tdLog.info("drop all topic for re-create")
tdSql.query('show topics;')
topicNum = tdSql.queryRows
tdLog.info(" topic count: %d"%(topicNum))
for i in range(topicNum):
sqlString = "drop topic %s" %(tdSql.getData(i, 0))
tdLog.info("drop topic sql: %s"%sqlString)
tdSql.execute(sqlString)
time.sleep(1)
tdLog.info("re-create topics")
topicNamePrefix = 'newTopic_'
queryString = "select * from %s.%s"%(paraDict['dbName'], paraDict['stbName'])
for i in range(topicNum):
sqlString = "create topic %s%d as %s" %(topicNamePrefix, i, queryString)
tdLog.info("create topic sql: %s"%sqlString)
tdSql.execute(sqlString)
#=================================================#
tdLog.info("drop all topic for testcase2")
tdSql.query('show topics;')
topicNum = tdSql.queryRows
tdLog.info(" topic count: %d"%(topicNum))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册