未验证 提交 28b86d12 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

<enh>[tools]: taosdump code cleanup (#11327)

* [TD-14540]<impr>: taosdump code cleanup

* update taos-tools

* refine 5-taos-tools/taosdump/taosdumpTestInspect.py

* [TD-14540]<impr>: refine tools/taosdumpTest2.py

* remove a few unused checks

* update taos-tools

* debug tools/taosdumpTest2.py

* add more debug

* temporary disable stream/sys.py

* reduce test batch of tools/taosdumpTest2.py

* use --monitor.writeToTD=false to avoid create log db by taosadapter
上级 2c0be807
Subproject commit d1c2c6404e10d303117caa02b746665974e0e264
Subproject commit 77660afbc8ebe44d32c8d5ca25b6afa7f5f9caee
......@@ -30,7 +30,7 @@ class TDTestCase:
self.ts = 1601481600000
self.numberOfTables = 1
self.numberOfRecords = 15000
self.numberOfRecords = 150
def getPath(self, tool="taosdump"):
selfPath = os.path.dirname(os.path.realpath(__file__))
......@@ -66,7 +66,6 @@ class TDTestCase:
tdSql.prepare()
print("DEBUG LN69: %s" % tdSql.getResult("show databases"))
tdSql.execute("create table st(ts timestamp, c1 timestamp, c2 int, c3 bigint, c4 float, c5 double, c6 binary(8), c7 smallint, c8 tinyint, c9 bool, c10 nchar(8)) tags(t1 int)")
tdSql.execute("create table t1 using st tags(0)")
currts = self.ts
......@@ -80,7 +79,6 @@ class TDTestCase:
break
tdSql.execute(sql)
print("DEBUG LN83: %s" % tdSql.getResult("show databases"))
binPath = self.getPath()
if (binPath == ""):
tdLog.exit("taosdump not found!")
......@@ -93,15 +91,12 @@ class TDTestCase:
"%s --databases db -o ./taosdumptest/tmp " %
binPath)
print("DEBUG LN96: %s" % tdSql.getResult("show databases"))
tdSql.execute("drop database db")
print("DEBUG LN98: %s" % tdSql.getResult("show databases"))
tdSql.query("show databases")
tdSql.checkRows(0)
os.system("%s -i ./taosdumptest/tmp -y" % binPath)
print("DEBUG LN104: %s" % tdSql.getResult("show databases"))
tdSql.query("show databases")
tdSql.checkRows(1)
tdSql.checkData(0, 0, 'db')
......@@ -116,7 +111,6 @@ class TDTestCase:
# test case for TS-1225
tdSql.execute("create database test")
print("DEBUG LN119: %s" % tdSql.getResult("show databases"))
tdSql.execute("use test")
tdSql.execute(
"create table stb(ts timestamp, c1 binary(16374), c2 binary(16374), c3 binary(16374)) tags(t1 nchar(256))")
......@@ -131,13 +125,11 @@ class TDTestCase:
os.system("%s -D test -o ./taosdumptest/tmp -y" % binPath)
tdSql.execute("drop database test")
print("DEBUG LN134: %s" % tdSql.getResult("show databases"))
tdSql.query("show databases")
tdSql.checkRows(1)
os.system("%s -i ./taosdumptest/tmp -y" % binPath)
print("DEBUG LN140: %s" % tdSql.getResult("show databases"))
tdSql.execute("use test")
tdSql.error("show vnodes '' ")
tdSql.query("show stables")
......
......@@ -294,7 +294,7 @@ class TDDnode:
print(cmd)
taosadapterCmd = "nohup %s --opentsdb_telnet.enable=true > /dev/null 2>&1 & " % (
taosadapterCmd = "nohup %s --opentsdb_telnet.enable=true --monitor.writeToTD=false > /dev/null 2>&1 & " % (
taosadapterBinPath)
tdLog.info(taosadapterCmd)
if os.system(taosadapterCmd) != 0:
......@@ -360,7 +360,7 @@ class TDDnode:
cmd = "mintty -h never -w hide %s -c %s" % (
binPath, self.cfgDir)
taosadapterCmd = "mintty -h never -w hide %s " % (
taosadapterCmd = "mintty -h never -w hide %s --monitor.writeToTD=false " % (
taosadapterBinPath)
if os.system(taosadapterCmd) != 0:
tdLog.exit(taosadapterCmd)
......@@ -431,7 +431,7 @@ class TDDnode:
print(cmd)
taosadapterCmd = "%s > /dev/null 2>&1 & " % (taosadapterBinPath)
taosadapterCmd = "%s --monitor.writeToTD=false > /dev/null 2>&1 & " % (taosadapterBinPath)
if os.system(taosadapterCmd) != 0:
tdLog.exit(taosadapterCmd)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册