提交 5180384a 编写于 作者: K kailixu

feat: test case adaption to support row/column up to 64k

上级 6c56818b
...@@ -144,9 +144,9 @@ class TDTestCase: ...@@ -144,9 +144,9 @@ class TDTestCase:
maxRowSize = self.getLimitFromSourceCode('TSDB_MAX_BYTES_PER_ROW') - 8 maxRowSize = self.getLimitFromSourceCode('TSDB_MAX_BYTES_PER_ROW') - 8
maxCols = self.getLimitFromSourceCode('TSDB_MAX_COLUMNS') - 1 maxCols = self.getLimitFromSourceCode('TSDB_MAX_COLUMNS') - 1
# for binary cols, 2 bytes are used for length # for binary cols, 2 bytes are used for length, 4 bytes are used for VarDataOffsetT
colLen = (maxRowSize - maxCols * 2) // maxCols colLen = (maxRowSize - maxCols * 6) // maxCols
firstColLen = maxRowSize - 2 * maxCols - colLen * (maxCols - 1) firstColLen = maxRowSize - 6 * maxCols - colLen * (maxCols - 1)
sql = "create table cars (ts timestamp, c0 binary(%d)" % firstColLen sql = "create table cars (ts timestamp, c0 binary(%d)" % firstColLen
for i in range(1, maxCols): for i in range(1, maxCols):
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
"sample_format": "csv", "sample_format": "csv",
"sample_file": "./sample.csv", "sample_file": "./sample.csv",
"tags_file": "", "tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}], "columns": [{"type": "BINARY", "len": 65514, "count":1}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}, },
{ {
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
"sample_format": "csv", "sample_format": "csv",
"sample_file": "./sample.csv", "sample_file": "./sample.csv",
"tags_file": "", "tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}], "columns": [{"type": "BINARY", "len": 21831, "count":3},{"type": "INT","count":2},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}] }]
}] }]
......
...@@ -215,7 +215,7 @@ class TDTestCase: ...@@ -215,7 +215,7 @@ class TDTestCase:
# taosdemo error # taosdemo error
# too max length # too max length
sql = "%s -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(4096\) \ sql = "%s -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(16379\) \
-w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I taosc" % (binPath, -w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I taosc" % (binPath,
cfgPath) cfgPath)
tdLog.info("%s" % sql) tdLog.info("%s" % sql)
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
"sample_format": "csv", "sample_format": "csv",
"sample_file": "./sample.csv", "sample_file": "./sample.csv",
"tags_file": "", "tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}], "columns": [{"type": "BINARY", "len": 65514, "count":1}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}, },
{ {
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
"sample_format": "csv", "sample_format": "csv",
"sample_file": "./sample.csv", "sample_file": "./sample.csv",
"tags_file": "", "tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}], "columns": [{"type": "BINARY", "len": 21831, "count":3},{"type": "INT","count":2},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}] }]
}] }]
......
...@@ -203,7 +203,7 @@ class TDTestCase: ...@@ -203,7 +203,7 @@ class TDTestCase:
# taosdemo error # taosdemo error
# too max length # too max length
sql = "%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(4096\) \ sql = "%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(16379\) \
-w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I taosc" % (binPath,cfgPath) -w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I taosc" % (binPath,cfgPath)
tdLog.info("%s" % sql ) tdLog.info("%s" % sql )
assert os.system("%s" % sql ) != 0 assert os.system("%s" % sql ) != 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册