Fix taosdemo test failure
This commit is contained in:
parent
0244298b60
commit
bdc6e4f00b
|
@ -31,10 +31,18 @@ class TDTestCase:
|
||||||
|
|
||||||
def insertDataAndAlterTable(self, threadID):
|
def insertDataAndAlterTable(self, threadID):
|
||||||
if(threadID == 0):
|
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):
|
if(threadID == 1):
|
||||||
print("use test")
|
print("use test")
|
||||||
tdSql.execute("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")
|
print("alter table test.meters add column f4 int")
|
||||||
tdSql.execute("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)")
|
print("insert into test.t0 values (now, 1, 2, 3, 4)")
|
||||||
|
|
Loading…
Reference in New Issue