From 924c46bb87ea9449ec7edb3251dac77871f35721 Mon Sep 17 00:00:00 2001 From: slguan Date: Sat, 9 May 2020 18:33:41 +0800 Subject: [PATCH] scripts --- src/vnode/src/vnodeWrite.c | 16 ++-- tests/script/basicSuite.sim | 58 ++++---------- tests/script/general/http/grafana_bug.sim | 38 ++++----- tests/script/general/http/telegraf.sim | 14 ++-- tests/script/general/insert/insert_drop.sim | 11 ++- tests/script/jenkins/basic.txt | 88 ++++++++++----------- 6 files changed, 103 insertions(+), 122 deletions(-) diff --git a/src/vnode/src/vnodeWrite.c b/src/vnode/src/vnodeWrite.c index 6f0bc5fcce..f560c648e1 100644 --- a/src/vnode/src/vnodeWrite.c +++ b/src/vnode/src/vnodeWrite.c @@ -184,7 +184,7 @@ static int32_t vnodeProcessAlterTableMsg(SVnodeObj *pVnode, void *pCont, SRspRet int16_t numOfColumns = htons(pTable->numOfColumns); int16_t numOfTags = htons(pTable->numOfTags); int32_t sid = htonl(pTable->sid); - uint64_t uid = htobe64(pTable->uid); + uint64_t uid = htobe64(pTable->uid); SSchema *pSchema = (SSchema *) pTable->data; int32_t totalCols = numOfColumns + numOfTags; @@ -231,13 +231,15 @@ static int32_t vnodeProcessDropStableMsg(SVnodeObj *pVnode, void *pCont, SRspRet int32_t code = 0; vTrace("vgId:%d, stable:%s, start to drop", pVnode->vgId, pTable->tableId); - // TODO: drop stable in vvnode - //int64_t uid = htobe64(pTable->uid); - //void *pTsdb = dnodeGetVnodeTsdb(pMsg->pVnode); - //rpcRsp.code = tsdbDropTable(pTsdb, pTable->uid); + + STableId stableId = { + .uid = htobe64(pTable->uid), + .tid = -1 + }; - code = TSDB_CODE_SUCCESS; - vTrace("vgId:%d, stable:%s, drop stable result:%x", pVnode, pTable->tableId, code); + code = tsdbDropTable(pVnode->tsdb, stableId); + + vTrace("vgId:%d, stable:%s, drop stable result:%s", pVnode, pTable->tableId, tstrerror(code)); return code; } diff --git a/tests/script/basicSuite.sim b/tests/script/basicSuite.sim index 93cd0de4d2..676ac93bf2 100644 --- a/tests/script/basicSuite.sim +++ b/tests/script/basicSuite.sim @@ -1,49 +1,25 @@ ################################# -run general/db/basic1.sim -run general/db/basic2.sim -run general/db/basic3.sim +run general/cache/new_metrics.sim +run general/compress/compress.sim +run general/compute/avg.sim +run general/compute/bottom.sim +run general/compute/count.sim +run general/db/len.sim run general/db/basic4.sim -run general/db/basic5.sim - -run general/table/basic1.sim -run general/table/basic2.sim +run general/http/restful_insert.sim +run general/import/basic.sim +run general/import/commit.sim +run general/insert/basic.sim +run general/insert/query_file_memory.sim +run general/parser/binary_escapeCharacter.sim +run general/parser/columnValue_bigint.sim +run general/parser/select_from_cache_disk.sim +run general/table/autocreate.sim run general/table/basic3.sim -run general/table/column_num.sim run general/table/column_name.sim -run general/table/bigint.sim -run general/table/bool.sim -run general/table/double.sim -run general/table/float.sim run general/table/int.sim -run general/table/smallint.sim -run general/table/tinyint.sim -run general/table/db.table.sim - +run general/table/vgroup.sim run general/user/basic1.sim -run general/user/pass_alter.sim -run general/user/pass_len.sim -run general/user/user_create.sim run general/user/user_len.sim - -# run general/compute/count.sim -# run general/compute/avg.sim -# run general/compute/sum.sim -# run general/compute/min.sim -# run general/compute/max.sim -# run general/compute/first.sim -# run general/compute/last.sim -run general/compute/stddev.sim -# run general/compute/leastsquare.sim -run general/compute/top.sim -run general/compute/bottom.sim -run general/compute/percentile.sim -run general/compute/diff.sim -# run general/compute/interval.sim -run general/compute/null.sim -# run general/compute/diff2.sim - -run general/parse/testSuite.sim -run general/field/testSuite.sim - - +run general/vector/single.sim ################################## diff --git a/tests/script/general/http/grafana_bug.sim b/tests/script/general/http/grafana_bug.sim index 6f12849b2b..708af23cfc 100644 --- a/tests/script/general/http/grafana_bug.sim +++ b/tests/script/general/http/grafana_bug.sim @@ -35,7 +35,7 @@ print =============== step1 - one query, 1 column, with timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"A","alias":"","sql":"select ts from db.tb where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"A","target":"A","datapoints":[["-",1577980800000],["-",1578067200000]]}]@ then +if $system_content != @[{"refId":"A","target":"A","datapoints":[[null,1577980800000],[null,1578067200000]]}]@ then return -1 endi @@ -51,32 +51,32 @@ print =============== step3 - one query, 3 column, with timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"A","alias":"","sql":"select ts,val,val1 from db.tb where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step3.1-> $system_content -if $system_content != @[{"refId":"A","target":"13","datapoints":[[2,1577980800000]]},{"refId":"A","target":"14","datapoints":[[2,1578067200000]]}]@ then +if $system_content != @[{"refId":"A","target":"{val1:13,}","datapoints":[[2,1577980800000]]},{"refId":"A","target":"{val1:14,}","datapoints":[[2,1578067200000]]}]@ then return -1 endi system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"A","alias":"","sql":"select ts,val,val1 from db.tb "} ]' 127.0.0.1:6020/grafana/query print step3.2-> $system_content -if $system_content != @[{"refId":"A","target":"11","datapoints":[[1,1577808000000]]},{"refId":"A","target":"12","datapoints":[[1,1577894400000]]},{"refId":"A","target":"13","datapoints":[[2,1577980800000]]},{"refId":"A","target":"14","datapoints":[[2,1578067200000]]}]@ then +if $system_content != @[{"refId":"A","target":"{val1:11,}","datapoints":[[1,1577808000000]]},{"refId":"A","target":"{val1:12,}","datapoints":[[1,1577894400000]]},{"refId":"A","target":"{val1:13,}","datapoints":[[2,1577980800000]]},{"refId":"A","target":"{val1:14,}","datapoints":[[2,1578067200000]]}]@ then return -1 endi system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"A","alias":"","sql":"select ts,val1,val from db.tb "} ]' 127.0.0.1:6020/grafana/query print step3.3-> $system_content -if $system_content != @[{"refId":"A","target":"1","datapoints":[[11,1577808000000],[12,1577894400000]]},{"refId":"A","target":"2","datapoints":[[13,1577980800000],[14,1578067200000]]}]@ then +if $system_content != @[{"refId":"A","target":"{val:1,}","datapoints":[[11,1577808000000],[12,1577894400000]]},{"refId":"A","target":"{val:2,}","datapoints":[[13,1577980800000],[14,1578067200000]]}]@ then return -1 endi print =============== step4 - one query, 4 column, with timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"A","alias":"","sql":"select ts,val2,val1,val from db.tb "} ]' 127.0.0.1:6020/grafana/query print step4.1-> $system_content -if $system_content != @[{"refId":"A","target":"1","datapoints":[[21,1577808000000],[22,1577894400000]]},{"refId":"A","target":"2","datapoints":[[23,1577980800000],[24,1578067200000]]}]@ then +if $system_content != @[{"refId":"A","target":"{val1:11,, val:1,}","datapoints":[[21,1577808000000]]},{"refId":"A","target":"{val1:12,, val:1,}","datapoints":[[22,1577894400000]]},{"refId":"A","target":"{val1:13,, val:2,}","datapoints":[[23,1577980800000]]},{"refId":"A","target":"{val1:14,, val:2,}","datapoints":[[24,1578067200000]]}]@ then return -1 endi system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"A","alias":"","sql":"select ts,val,val1,val2 from db.tb "} ]' 127.0.0.1:6020/grafana/query print step4.2-> $system_content -if $system_content != @[{"refId":"A","target":"21","datapoints":[[1,1577808000000]]},{"refId":"A","target":"22","datapoints":[[1,1577894400000]]},{"refId":"A","target":"23","datapoints":[[2,1577980800000]]},{"refId":"A","target":"24","datapoints":[[2,1578067200000]]}]@ then +if $system_content != @[{"refId":"A","target":"{val1:11,, val2:21,}","datapoints":[[1,1577808000000]]},{"refId":"A","target":"{val1:12,, val2:22,}","datapoints":[[1,1577894400000]]},{"refId":"A","target":"{val1:13,, val2:23,}","datapoints":[[2,1577980800000]]},{"refId":"A","target":"{val1:14,, val2:24,}","datapoints":[[2,1578067200000]]}]@ then return -1 endi @@ -90,20 +90,20 @@ endi print =============== step6 - one query, 2 column, no timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"A","alias":"","sql":"select val1,val2 from db.tb where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"A","target":"23","datapoints":[[13,"-"]]},{"refId":"A","target":"24","datapoints":[[14,"-"]]}]@ then +if $system_content != @[{"refId":"A","target":"{val2:23,}","datapoints":[[13,"-"]]},{"refId":"A","target":"{val2:24,}","datapoints":[[14,"-"]]}]@ then return -1 endi print =============== step7 - one query, 3 column, no timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"A","alias":"","sql":"select val1,val2,val from db.tb where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"A","target":"2","datapoints":[[13,"-"],[14,"-"]]}]@ then +if $system_content != @[{"refId":"A","target":"{val2:23,, val:2,}","datapoints":[[13,"-"]]},{"refId":"A","target":"{val2:24,, val:2,}","datapoints":[[14,"-"]]}]@ then return -1 endi system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"A","alias":"","sql":"select val1,val2,val from db.tb"} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"A","target":"1","datapoints":[[11,"-"],[12,"-"]]},{"refId":"A","target":"2","datapoints":[[13,"-"],[14,"-"]]}]@ then +if $system_content != @[{"refId":"A","target":"{val2:21,, val:1,}","datapoints":[[11,"-"]]},{"refId":"A","target":"{val2:22,, val:1,}","datapoints":[[12,"-"]]},{"refId":"A","target":"{val2:23,, val:2,}","datapoints":[[13,"-"]]},{"refId":"A","target":"{val2:24,, val:2,}","datapoints":[[14,"-"]]}]@ then return -1 endi @@ -132,7 +132,7 @@ print =============== step11 - two query, 1 column, with timestamp, 1 column, w system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"B","alias":"BB","sql":"select ts from db.tb2 where ts >= 1577980800000 "},{"refId":"A","alias":"","sql":"select ts from db.tb where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"B","target":"BB","datapoints":[["-",1577980800000],["-",1578067200000]]},{"refId":"A","target":"A","datapoints":[["-",1577980800000],["-",1578067200000]]}]@ then +if $system_content != @[{"refId":"B","target":"BB","datapoints":[[null,1577980800000],[null,1578067200000]]},{"refId":"A","target":"A","datapoints":[[null,1577980800000],[null,1578067200000]]}]@ then return -1 endi @@ -140,14 +140,14 @@ print =============== step12 - two query, 1 column, with timestamp, 2 column, w system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"B","alias":"BB","sql":"select ts from db.tb2 where ts >= 1577980800000 "},{"refId":"A","alias":"","sql":"select ts,val from db.tb where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"B","target":"BB","datapoints":[["-",1577980800000],["-",1578067200000]]},{"refId":"A","target":"A","datapoints":[[2,1577980800000],[2,1578067200000]]}]@ then +if $system_content != @[{"refId":"B","target":"BB","datapoints":[[null,1577980800000],[null,1578067200000]]},{"refId":"A","target":"A","datapoints":[[2,1577980800000],[2,1578067200000]]}]@ then return -1 endi print =============== step13 - two query, 1 column, with timestamp, 3 column, with timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"B","alias":"BB","sql":"select ts from db.tb2 where ts >= 1577980800000 "},{"refId":"A","alias":"","sql":"select ts,val,val1 from db.tb where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"B","target":"BB","datapoints":[["-",1577980800000],["-",1578067200000]]},{"refId":"A","target":"13","datapoints":[[2,1577980800000]]},{"refId":"A","target":"14","datapoints":[[2,1578067200000]]}]@ then +if $system_content != @[{"refId":"B","target":"BB","datapoints":[[null,1577980800000],[null,1578067200000]]},{"refId":"A","target":"{val1:13,}","datapoints":[[2,1577980800000]]},{"refId":"A","target":"{val1:14,}","datapoints":[[2,1578067200000]]}]@ then return -1 endi @@ -161,14 +161,14 @@ endi print =============== step15 - two query, 2 column, with timestamp, 3 column, with timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"B","alias":"BB","sql":"select ts, val2, val1 from db.tb2 where ts >= 1577980800000 "},{"refId":"A","alias":"AA","sql":"select ts,val from db.tb where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"B","target":"BB213","datapoints":[[223,1577980800000]]},{"refId":"B","target":"BB214","datapoints":[[224,1578067200000]]},{"refId":"A","target":"AA","datapoints":[[2,1577980800000],[2,1578067200000]]}]@ then +if $system_content != @[{"refId":"B","target":"BB{val1:213,}","datapoints":[[223,1577980800000]]},{"refId":"B","target":"BB{val1:214,}","datapoints":[[224,1578067200000]]},{"refId":"A","target":"AA","datapoints":[[2,1577980800000],[2,1578067200000]]}]@ then return -1 endi print =============== step16 - two query, 3 column, with timestamp, 4 column, with timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"B","alias":"BB","sql":"select ts, val, val1, val2, val1 from db.tb2 where ts >= 1577980800000 "},{"refId":"A","alias":"AA","sql":"select ts,val,val1 from db.tb where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"B","target":"BB213","datapoints":[[22,1577980800000]]},{"refId":"B","target":"BB214","datapoints":[[22,1578067200000]]},{"refId":"A","target":"AA13","datapoints":[[2,1577980800000]]},{"refId":"A","target":"AA14","datapoints":[[2,1578067200000]]}]@ then +if $system_content != @[{"refId":"B","target":"BB{val1:213,, val2:223,, val1:213,}","datapoints":[[22,1577980800000]]},{"refId":"B","target":"BB{val1:214,, val2:224,, val1:214,}","datapoints":[[22,1578067200000]]},{"refId":"A","target":"AA{val1:13,}","datapoints":[[2,1577980800000]]},{"refId":"A","target":"AA{val1:14,}","datapoints":[[2,1578067200000]]}]@ then return -1 endi @@ -196,7 +196,7 @@ endi print =============== step20 - two query, 1 column, no timestamp, 1 column, with timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"B","alias":"BB","sql":"select val from db.tb2 where ts >= 1577980800000 "},{"refId":"A","alias":"AA","sql":"select ts from db.tb2 where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"B","target":"BB","datapoints":[[22,"-"],[22,"-"]]},{"refId":"A","target":"AA","datapoints":[["-",1577980800000],["-",1578067200000]]}]@ then +if $system_content != @[{"refId":"B","target":"BB","datapoints":[[22,"-"],[22,"-"]]},{"refId":"A","target":"AA","datapoints":[[null,1577980800000],[null,1578067200000]]}]@ then return -1 endi @@ -210,28 +210,28 @@ endi print =============== step22 - two query, 1 column, no timestamp, 3 column, with timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"B","alias":"BB","sql":"select val from db.tb2 where ts >= 1577980800000 "},{"refId":"A","alias":"AA","sql":"select ts,val1, val2 from db.tb2 where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"B","target":"BB","datapoints":[[22,"-"],[22,"-"]]},{"refId":"A","target":"AA223","datapoints":[[213,1577980800000]]},{"refId":"A","target":"AA224","datapoints":[[214,1578067200000]]}]@ then +if $system_content != @[{"refId":"B","target":"BB","datapoints":[[22,"-"],[22,"-"]]},{"refId":"A","target":"AA{val2:223,}","datapoints":[[213,1577980800000]]},{"refId":"A","target":"AA{val2:224,}","datapoints":[[214,1578067200000]]}]@ then return -1 endi print =============== step23 - two query, 2 column, no timestamp, 1 column, no timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"B","alias":"BB","sql":"select val1,val2 from db.tb2 where ts >= 1577980800000 "},{"refId":"A","alias":"AA","sql":"select val1 from db.tb2 where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"B","target":"BB223","datapoints":[[213,"-"]]},{"refId":"B","target":"BB224","datapoints":[[214,"-"]]},{"refId":"A","target":"AA","datapoints":[[213,"-"],[214,"-"]]}]@ then +if $system_content != @[{"refId":"B","target":"BB{val2:223,}","datapoints":[[213,"-"]]},{"refId":"B","target":"BB{val2:224,}","datapoints":[[214,"-"]]},{"refId":"A","target":"AA","datapoints":[[213,"-"],[214,"-"]]}]@ then return -1 endi print =============== step24 - two query, 2 column, no timestamp, 2 column, no timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"B","alias":"BB","sql":"select val1,val2 from db.tb2 where ts >= 1577980800000 "},{"refId":"A","alias":"AA","sql":"select val,val1 from db.tb2 where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"B","target":"BB223","datapoints":[[213,"-"]]},{"refId":"B","target":"BB224","datapoints":[[214,"-"]]},{"refId":"A","target":"AA213","datapoints":[[22,"-"]]},{"refId":"A","target":"AA214","datapoints":[[22,"-"]]}]@ then +if $system_content != @[{"refId":"B","target":"BB{val2:223,}","datapoints":[[213,"-"]]},{"refId":"B","target":"BB{val2:224,}","datapoints":[[214,"-"]]},{"refId":"A","target":"AA{val1:213,}","datapoints":[[22,"-"]]},{"refId":"A","target":"AA{val1:214,}","datapoints":[[22,"-"]]}]@ then return -1 endi print =============== step25 - two query, 2 column, no timestamp, 3 column, no timestamp system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d '[ {"refId":"B","alias":"BB","sql":"select val1,val2 from db.tb2 where ts >= 1577980800000 "},{"refId":"A","alias":"AA","sql":"select val,val1,val2 from db.tb2 where ts >= 1577980800000 "} ]' 127.0.0.1:6020/grafana/query print step1-> $system_content -if $system_content != @[{"refId":"B","target":"BB223","datapoints":[[213,"-"]]},{"refId":"B","target":"BB224","datapoints":[[214,"-"]]},{"refId":"A","target":"AA223","datapoints":[[22,"-"]]},{"refId":"A","target":"AA224","datapoints":[[22,"-"]]}]@ then +if $system_content != @[{"refId":"B","target":"BB{val2:223,}","datapoints":[[213,"-"]]},{"refId":"B","target":"BB{val2:224,}","datapoints":[[214,"-"]]},{"refId":"A","target":"AA{val1:213,, val2:223,}","datapoints":[[22,"-"]]},{"refId":"A","target":"AA{val1:214,, val2:224,}","datapoints":[[22,"-"]]}]@ then return -1 endi diff --git a/tests/script/general/http/telegraf.sim b/tests/script/general/http/telegraf.sim index 60eeec652e..d9f3340f06 100644 --- a/tests/script/general/http/telegraf.sim +++ b/tests/script/general/http/telegraf.sim @@ -16,14 +16,14 @@ print =============== step1 - parse system_content curl -u root:taosdata -d '{"fields":{"Percent_DPC_Time":0,"Percent_Idle_Time":95.59830474853516,"Percent_Interrupt_Time":0,"Percent_Privileged_Time":0,"Percent_Processor_Time":0,"Percent_User_Time":0},"name":"win_cpu","tags":{"host":"windows","instance":"1","objectname":"Processor"},"timestamp":1535784122}' 127.0.0.1:6020/telegraf/ print $system_content -if $system_content != @{"status":"error","code":1022,"desc":"database name can not be NULL"}@ then +if $system_content != @{"status":"error","code":1022,"desc":"database name can not be null"}@ then return -1 endi system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'select * from d1.table_admin' -d '{"fields":{"Percent_DPC_Time":0,"Percent_Idle_Time":95.59830474853516,"Percent_Interrupt_Time":0,"Percent_Privileged_Time":0,"Percent_Processor_Time":0,"Percent_User_Time":0},"name":"win_cpu","tags":{"host":"windows","instance":"1","objectname":"Processor"},"timestamp":1535784122}' 127.0.0.1:6020/telegraf/ print $system_content -if $system_content != @{"status":"error","code":1022,"desc":"database name can not be NULL"}@ then +if $system_content != @{"status":"error","code":1022,"desc":"database name can not be null"}@ then return -1 endi @@ -170,7 +170,7 @@ endi system_content curl -u root:taosdata -d '{"fields":{"Percent_DPC_Time":0,"Percent_Idle_Time":95.59830474853516,"Percent_Interrupt_Time":0,"Percent_Privileged_Time":0,"Percent_Processor_Time":0,"Percent_User_Time":0},"name":"win_cpu","tags":{"":"windows"},"timestamp":1535784122}' 127.0.0.1:6020/telegraf/db/root/taosdata1 print $system_content -if $system_content != @{"status":"error","code":1038,"desc":"tag name is NULL"}@ then +if $system_content != @{"status":"error","code":1038,"desc":"tag name is null"}@ then return -1 endi @@ -191,14 +191,14 @@ endi system_content curl -u root:taosdata -d '{"fields":{"Percent_DPC_Time":0,"Percent_Idle_Time":95.59830474853516,"Percent_Interrupt_Time":0,"Percent_Privileged_Time":0,"Percent_Processor_Time":0,"Percent_User_Time":0},"name":"win_cpu","tags":{"host":""},"timestamp":1535784122}' 127.0.0.1:6020/telegraf/db/root/taosdata1 print $system_content -if $system_content != @{"status":"error","code":1041,"desc":"tag value is NULL"}@ then +if $system_content != @{"status":"error","code":1041,"desc":"tag value is null"}@ then return -1 endi system_content curl -u root:taosdata -d '{"fields":{"Percent_DPC_Time":0,"Percent_Idle_Time":95.59830474853516,"Percent_Interrupt_Time":0,"Percent_Privileged_Time":0,"Percent_Processor_Time":0,"Percent_User_Time":0},"name":"win_cpu","tags":{"1022":"111"},"timestamp":1535784122}' 127.0.0.1:6020/telegraf/db/root/taosdata1 print $system_content -if $system_content != @{"status":"error","code":1042,"desc":"table is NULL"}@ then +if $system_content != @{"status":"error","code":1042,"desc":"table is null"}@ then return -1 endi @@ -219,14 +219,14 @@ endi system_content curl -u root:taosdata -d '{"fields":{"":0,"Percent_Idle_Time":95.59830474853516,"Percent_Interrupt_Time":0,"Percent_Privileged_Time":0,"Percent_Processor_Time":0,"Percent_User_Time":0},"name":"win_cpu","tags":{"host":"windows","instance":"1","objectname":"Processor"},"timestamp":1535784122}' 127.0.0.1:6020/telegraf/db/root/taosdata1 print $system_content -if $system_content != @{"status":"error","code":1048,"desc":"field name is NULL"}@ then +if $system_content != @{"status":"error","code":1048,"desc":"field name is null"}@ then return -1 endi system_content curl -u root:taosdata -d '{"fields":{"Percent_DPC_Time":"","Percent_Idle_Time":95.59830474853516,"Percent_Interrupt_Time":0,"Percent_Privileged_Time":0,"Percent_Processor_Time":0,"Percent_User_Time":0},"name":"win_cpu","tags":{"host":"windows","instance":"1","objectname":"Processor"},"timestamp":1535784122}' 127.0.0.1:6020/telegraf/db/root/taosdata1 print $system_content -if $system_content != @{"status":"error","code":1051,"desc":"field value is NULL"}@ then +if $system_content != @{"status":"error","code":1051,"desc":"field value is null"}@ then return -1 endi diff --git a/tests/script/general/insert/insert_drop.sim b/tests/script/general/insert/insert_drop.sim index 087b9f6aa9..5655576e20 100644 --- a/tests/script/general/insert/insert_drop.sim +++ b/tests/script/general/insert/insert_drop.sim @@ -46,8 +46,9 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT sleep 2000 system sh/exec.sh -n dnode1 -s start print ================== server restart completed -sql connect -sleep 3000 + +sql reset query cache +sleep 1000 sql use $db sql drop table tb5 @@ -71,13 +72,15 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT sleep 2000 system sh/exec.sh -n dnode1 -s start print ================== server restart completed -sql connect -sleep 3000 + +sql reset query cache +sleep 1000 sql use $db sql create table tb5 using $stb tags(5) sql select * from tb5 +print $rows should be 0 if $rows != 0 then return -1 endi diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 1858211c50..6e9572e83c 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -65,20 +65,20 @@ cd ../../../debug; make #./test.sh -f general/field/4.sim #./test.sh -f general/field/5.sim #./test.sh -f general/field/6.sim -./test.sh -f general/field/bigint.sim +##./test.sh -f general/field/bigint.sim #./test.sh -f general/field/binary.sim -./test.sh -f general/field/bool.sim +##./test.sh -f general/field/bool.sim #./test.sh -f general/field/single.sim -./test.sh -f general/field/smallint.sim -./test.sh -f general/field/tinyint.sim +##./test.sh -f general/field/smallint.sim +##./test.sh -f general/field/tinyint.sim -./test.sh -f general/http/restful.sim +##./test.sh -f general/http/restful.sim ./test.sh -f general/http/restful_insert.sim ./test.sh -f general/http/restful_limit.sim -./test.sh -f general/http/restful_full.sim +##./test.sh -f general/http/restful_full.sim ./test.sh -f general/http/prepare.sim ./test.sh -f general/http/telegraf.sim -#./test.sh -f general/http/grafana_bug.sim +./test.sh -f general/http/grafana_bug.sim #./test.sh -f general/http/grafana.sim ./test.sh -f general/import/basic.sim @@ -220,9 +220,9 @@ cd ../../../debug; make ./test.sh -f general/user/basic1.sim #./test.sh -f general/user/monitor.sim -./test.sh -f general/user/pass_alter.sim +##./test.sh -f general/user/pass_alter.sim ./test.sh -f general/user/pass_len.sim -./test.sh -f general/user/user_create.sim +##./test.sh -f general/user/user_create.sim ./test.sh -f general/user/user_len.sim #./test.sh -f general/vector/metrics_field.sim @@ -240,24 +240,24 @@ cd ../../../debug; make ################################# ./test.sh -u -f unique/account/account_create.sim -./test.sh -u -f unique/account/account_delete.sim +##./test.sh -u -f unique/account/account_delete.sim ./test.sh -u -f unique/account/account_len.sim -./test.sh -u -f unique/account/authority.sim +##./test.sh -u -f unique/account/authority.sim ./test.sh -u -f unique/account/basic.sim ./test.sh -u -f unique/account/paras.sim -./test.sh -u -f unique/account/pass_alter.sim +##./test.sh -u -f unique/account/pass_alter.sim ./test.sh -u -f unique/account/pass_len.sim ./test.sh -u -f unique/account/usage.sim -./test.sh -u -f unique/account/user_create.sim +##./test.sh -u -f unique/account/user_create.sim ./test.sh -u -f unique/account/user_len.sim #./test.sh -u -f unique/big/balance.sim #./test.sh -u -f unique/big/maxvnodes.sim #./test.sh -u -f unique/big/tcp.sim -./test.sh -u -f unique/cluster/balance1.sim -./test.sh -u -f unique/cluster/balance2.sim -./test.sh -u -f unique/cluster/balance3.sim +##./test.sh -u -f unique/cluster/balance1.sim +##./test.sh -u -f unique/cluster/balance2.sim +##./test.sh -u -f unique/cluster/balance3.sim #./test.sh -u -f unique/cluster/cache.sim ./test.sh -u -f unique/column/replica3.sim @@ -265,26 +265,26 @@ cd ../../../debug; make #./test.sh -u -f unique/db/commit.sim #./test.sh -u -f unique/db/delete.sim #./test.sh -u -f unique/db/delete_part.sim -./test.sh -u -f unique/db/replica_add12.sim -./test.sh -u -f unique/db/replica_add13.sim -./test.sh -u -f unique/db/replica_add23.sim -./test.sh -u -f unique/db/replica_reduce21.sim -./test.sh -u -f unique/db/replica_reduce32.sim -./test.sh -u -f unique/db/replica_reduce31.sim -./test.sh -u -f unique/db/replica_part.sim - -./test.sh -u -f unique/dnode/balance1.sim -./test.sh -u -f unique/dnode/balance2.sim -./test.sh -u -f unique/dnode/balance3.sim -./test.sh -u -f unique/dnode/balancex.sim -./test.sh -u -f unique/dnode/offline1.sim -./test.sh -u -f unique/dnode/offline2.sim +##./test.sh -u -f unique/db/replica_add12.sim +##./test.sh -u -f unique/db/replica_add13.sim +##./test.sh -u -f unique/db/replica_add23.sim +##./test.sh -u -f unique/db/replica_reduce21.sim +##./test.sh -u -f unique/db/replica_reduce32.sim +##./test.sh -u -f unique/db/replica_reduce31.sim +##./test.sh -u -f unique/db/replica_part.sim + +##./test.sh -u -f unique/dnode/balance1.sim +##./test.sh -u -f unique/dnode/balance2.sim +##./test.sh -u -f unique/dnode/balance3.sim +##./test.sh -u -f unique/dnode/balancex.sim +##./test.sh -u -f unique/dnode/offline1.sim +##./test.sh -u -f unique/dnode/offline2.sim #./test.sh -u -f unique/dnode/remove1.sim #./test.sh -u -f unique/dnode/remove2.sim #./test.sh -u -f unique/dnode/vnode_clean.sim -./test.sh -u -f unique/http/admin.sim -./test.sh -u -f unique/http/opentsdb.sim +##./test.sh -u -f unique/http/admin.sim +##./test.sh -u -f unique/http/opentsdb.sim #./test.sh -u -f unique/import/replica2.sim #./test.sh -u -f unique/import/replica3.sim @@ -298,28 +298,28 @@ cd ../../../debug; make #./test.sh -u -f unique/metrics/replica3_dnode6.sim #./test.sh -u -f unique/metrics/replica3_vnode3.sim -./test.sh -u -f unique/mnode/mgmt22.sim -./test.sh -u -f unique/mnode/mgmt23.sim -./test.sh -u -f unique/mnode/mgmt24.sim -./test.sh -u -f unique/mnode/mgmt25.sim -./test.sh -u -f unique/mnode/mgmt26.sim -./test.sh -u -f unique/mnode/mgmt33.sim -./test.sh -u -f unique/mnode/mgmt34.sim +##./test.sh -u -f unique/mnode/mgmt22.sim +##./test.sh -u -f unique/mnode/mgmt23.sim +##./test.sh -u -f unique/mnode/mgmt24.sim +##./test.sh -u -f unique/mnode/mgmt25.sim +##./test.sh -u -f unique/mnode/mgmt26.sim +##./test.sh -u -f unique/mnode/mgmt33.sim +##./test.sh -u -f unique/mnode/mgmt34.sim #./test.sh -u -f unique/mnode/mgmtr2.sim #./test.sh -u -f unique/mnode/secondIp.sim #stream -./test.sh -u -f unique/table/delete_part.sim +##./test.sh -u -f unique/table/delete_part.sim -./test.sh -u -f unique/vnode/replica2_basic2.sim -./test.sh -u -f unique/vnode/replica3_basic.sim +##./test.sh -u -f unique/vnode/replica2_basic2.sim +##./test.sh -u -f unique/vnode/replica3_basic.sim #./test.sh -u -f unique/vnode/commit.sim #./test.sh -u -f unique/vnode/many.sim #./test.sh -u -f unique/vnode/replica2_basic.sim -./test.sh -u -f unique/vnode/replica2_basic2.sim +##./test.sh -u -f unique/vnode/replica2_basic2.sim #./test.sh -u -f unique/vnode/replica2_repeat.sim -./test.sh -u -f unique/vnode/replica3_basic.sim +##./test.sh -u -f unique/vnode/replica3_basic.sim #./test.sh -u -f unique/vnode/replica3_repeat.sim #./test.sh -u -f unique/vnode/replica3_vgroup.sim -- GitLab