Fix taosdemo test failure

This commit is contained in:
Ping Xiao 2021-02-02 16:50:32 +08:00
parent 0244298b60
commit bdc6e4f00b
1 changed files with 11 additions and 3 deletions

View File

@ -31,10 +31,18 @@ class TDTestCase:
def insertDataAndAlterTable(self, threadID):
if(threadID == 0):
os.system("yes | taosdemo -t %d -n %d" % (self.numberOfTables, self.numberOfRecords))
os.system("yes | taosdemo -t %d -n %d -x" % (self.numberOfTables, self.numberOfRecords))
if(threadID == 1):
print("use test")
tdSql.execute("use test")
while True:
print("query started")
tdSql.query("select * from test.t9")
rows = tdSql.queryRows
print("rows %d" % rows)
if(rows > 0):
break
time.sleep(1)
print("alter table test.meters add column f4 int")
tdSql.execute("alter table test.meters add column f4 int")
print("insert into test.t0 values (now, 1, 2, 3, 4)")