diff --git a/tests/pytest/random-test/random-test-multi-threading-3.py b/tests/pytest/random-test/random-test-multi-threading-3.py index 91f35ea7a5b812c28711a75b91ce8faa71223d68..47c4228a8fb2df18ee8e8ce8b407d3d5b3b83ac8 100644 --- a/tests/pytest/random-test/random-test-multi-threading-3.py +++ b/tests/pytest/random-test/random-test-multi-threading-3.py @@ -127,6 +127,8 @@ class Test (Thread): def drop_stable(self): tdLog.info("drop_stable") global last_stb + global last_tb + global written if (last_stb == ""): tdLog.info("no super table") @@ -135,6 +137,8 @@ class Test (Thread): tdLog.info("will drop last super table") tdSql.execute('drop table %s' % last_stb) last_stb = "" + last_tb = "" + written = 0 def restart_database(self): tdLog.info("restart_database") diff --git a/tests/pytest/random-test/random-test-multi-threading.py b/tests/pytest/random-test/random-test-multi-threading.py index 997001157e804021d465ad4a6c580ad33e5631c5..65b6dcd948ca6a789d66f8c20ca3c2397bff0974 100644 --- a/tests/pytest/random-test/random-test-multi-threading.py +++ b/tests/pytest/random-test/random-test-multi-threading.py @@ -105,12 +105,18 @@ class Test (threading.Thread): return else: tdLog.info("will create stable %s" % current_stb) + tdLog.info( + 'create table %s(ts timestamp, c1 int, c2 nchar(10)) tags (t1 int, t2 nchar(10))' % + current_stb) tdSql.execute( 'create table %s(ts timestamp, c1 int, c2 nchar(10)) tags (t1 int, t2 nchar(10))' % current_stb) last_stb = current_stb current_tb = "tb%d" % int(round(time.time() * 1000)) + tdLog.info( + "create table %s using %s tags (1, '表1')" % + (current_tb, last_stb)) tdSql.execute( "create table %s using %s tags (1, '表1')" % (current_tb, last_stb)) @@ -128,6 +134,8 @@ class Test (threading.Thread): def drop_stable(self): tdLog.info("drop_stable") global last_stb + global last_tb + global written if (last_stb == ""): tdLog.info("no super table") @@ -136,6 +144,8 @@ class Test (threading.Thread): tdLog.info("will drop last super table") tdSql.execute('drop table %s' % last_stb) last_stb = "" + last_tb = "" + written = 0 def restart_database(self): tdLog.info("restart_database") diff --git a/tests/pytest/random-test/random-test.py b/tests/pytest/random-test/random-test.py index 9cfc24f4045b6f57448dce7893d30fe68944afc6..5eb356960ab5207824c4eb4d1f75323b530ca5dd 100644 --- a/tests/pytest/random-test/random-test.py +++ b/tests/pytest/random-test/random-test.py @@ -111,6 +111,8 @@ class Test: tdLog.info("will drop last super table") tdSql.execute('drop table %s' % self.last_stb) self.last_stb = "" + self.last_tb = "" + self.written = 0 def query_data_from_stable(self): tdLog.info("query_data_from_stable")