test: add udfpy_main.py to ci

This commit is contained in:
Alex Duan 2023-03-27 19:58:47 +08:00
parent 1684f07a0b
commit 6d42ddb7f9
3 changed files with 9 additions and 16 deletions

View File

@ -120,6 +120,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/fsync.py
,,n,system-test,python3 ./test.py -f 0-others/compatibility.py
,,n,system-test,python3 ./test.py -f 0-others/tag_index_basic.py
,,n,system-test,python3 ./test.py -f 0-others/udfpy_main.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_database.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py

View File

@ -1,5 +1,3 @@
import pickle
def init():
pass
@ -7,23 +5,17 @@ def destroy():
pass
def start():
return pickle.dumps([])
return pickle.dumps(0)
def finish(buf):
counts = pickle.loads(buf)
all_count = 0
for count in counts:
all_count += count
return all_count
count = pickle.loads(buf)
return count
def reduce(datablock, buf):
(rows, cols) = datablock.shape()
counts = pickle.loads(buf)
batch_count = 0
count = pickle.loads(buf)
for i in range(rows):
val = datablock.data(i, 0)
if val is not None:
batch_count += 1
counts.append(batch_count)
return pickle.dumps(counts)
count += 1
return pickle.dumps(count)

View File

@ -401,8 +401,8 @@ class TDTestCase:
# var
stable = "meters"
tbname = "d"
count = 3
rows = 3000000
count = 10
rows = 50000
# do
self.create_table(stable, tbname, count)
self.insert_data(tbname, rows)