diff --git a/src/mnode/src/mgmtDb.c b/src/mnode/src/mgmtDb.c index c6506a350a56357b4f21d5ea0fa4d38bc13c74c2..d8dfcbe213304ad4f19a441a7781b2ed98970679 100644 --- a/src/mnode/src/mgmtDb.c +++ b/src/mnode/src/mgmtDb.c @@ -811,20 +811,20 @@ static SDbCfg mgmtGetAlterDbOption(SDbObj *pDb, SCMAlterDbMsg *pAlter) { if (replications > 0 && replications != pDb->cfg.replications) { mTrace("db:%s, replications:%d change to %d", pDb->name, pDb->cfg.replications, replications); newCfg.replications = replications; - } - if (replications > mgmtGetDnodesNum()) { - mError("db:%s, no enough dnode to change replica:%d", pDb->name, replications); - terrno = TSDB_CODE_NO_ENOUGH_DNODES; - } + if (replications > mgmtGetDnodesNum()) { + mError("db:%s, no enough dnode to change replica:%d", pDb->name, replications); + terrno = TSDB_CODE_NO_ENOUGH_DNODES; + } - if (pDb->cfg.replications - replications >= 2) { - mError("db:%s, replica number can't change from 3 to 1", pDb->name, replications); - terrno = TSDB_CODE_INVALID_OPTION; + if (pDb->cfg.replications - replications >= 2) { + mError("db:%s, replica number can't change from 3 to 1", pDb->name, replications); + terrno = TSDB_CODE_INVALID_OPTION; + } } - - if (walLevel < TSDB_MIN_WAL_LEVEL || walLevel > TSDB_MAX_WAL_LEVEL) { - mError("db:%s, wal level should be between 0-2", pDb->name); + + if (walLevel > 0 && (walLevel < TSDB_MIN_WAL_LEVEL || walLevel > TSDB_MAX_WAL_LEVEL)) { + mError("db:%s, wal level %d should be between 0-2, origin:%d", pDb->name, walLevel, pDb->cfg.walLevel); terrno = TSDB_CODE_INVALID_OPTION; } diff --git a/src/plugins/http/src/httpServer.c b/src/plugins/http/src/httpServer.c index a0d3b6314d3541f7b6205f4660d55517622f2eda..51795a570d2a25360561938642cd175623244bd7 100644 --- a/src/plugins/http/src/httpServer.c +++ b/src/plugins/http/src/httpServer.c @@ -269,11 +269,12 @@ void httpCleanUpConnect(HttpServer *pServer) { for (i = 0; i < pServer->numOfThreads; ++i) { pThread = pServer->pThreads + i; + if (pThread == NULL) continue; //taosCloseSocket(pThread->pollFd); - while (pThread->pHead) { - httpCleanUpContext(pThread->pHead, 0); - } + //while (pThread->pHead) { + // httpCleanUpContext(pThread->pHead, 0); + //} pthread_cancel(pThread->thread); pthread_join(pThread->thread, NULL); diff --git a/src/plugins/http/src/httpSystem.c b/src/plugins/http/src/httpSystem.c index 9a8841b8de2e3d152a363da2bffa117795342a15..8b95077632a48f09491cf2998b56500441a3be80 100644 --- a/src/plugins/http/src/httpSystem.c +++ b/src/plugins/http/src/httpSystem.c @@ -131,7 +131,11 @@ void httpCleanUpSystem() { httpServer->timerHandle = NULL; } - httpCleanUpConnect(httpServer); + if (httpServer->pThreads != NULL) { + httpCleanUpConnect(httpServer); + httpServer->pThreads = NULL; + } + #if 0 httpRemoveAllSessions(httpServer); diff --git a/src/plugins/monitor/src/monitorMain.c b/src/plugins/monitor/src/monitorMain.c index a4f9f320503ed99d6ca6b5b9941274829f6b3edd..7836dbae85369bac1dceec392f3f8da8ae4ce2df 100644 --- a/src/plugins/monitor/src/monitorMain.c +++ b/src/plugins/monitor/src/monitorMain.c @@ -44,7 +44,7 @@ #define SQL_LENGTH 1024 #define LOG_LEN_STR 80 -#define IP_LEN_STR 15 +#define IP_LEN_STR 18 #define CHECK_INTERVAL 1000 typedef enum { @@ -115,6 +115,13 @@ static void monitorInitConn(void *para, void *unused) { if (tsMonitorConn.ep[0] == 0) strcpy(tsMonitorConn.ep, tsLocalEp); + int len = strlen(tsMonitorConn.ep); + for (int i = 0; i < len; ++i) { + if (tsMonitorConn.ep[i] == ':' || tsMonitorConn.ep[i] == '-') { + tsMonitorConn.ep[i] = '_'; + } + } + if (tsMonitorConn.conn == NULL) { taos_connect_a(NULL, "monitor", tsInternalPass, "", 0, monitorInitConnCb, &tsMonitorConn, &(tsMonitorConn.conn)); } else { @@ -141,8 +148,8 @@ static void dnodeBuildMonitorSql(char *sql, int32_t cmd) { if (cmd == MONITOR_CMD_CREATE_DB) { snprintf(sql, SQL_LENGTH, - "create database if not exists %s replica 1 days 10 keep 30 rows 1024 cache 2048 " - "ablocks 2 tblocks 32 tables 32 precision 'us'", + "create database if not exists %s replica 1 days 10 keep 30 cache 2 " + "blocks 2 maxtables 32 precision 'us'", tsMonitorDbName); } else if (cmd == MONITOR_CMD_CREATE_MT_DN) { snprintf(sql, SQL_LENGTH, @@ -154,7 +161,7 @@ static void dnodeBuildMonitorSql(char *sql, int32_t cmd) { ", io_read float, io_write float" ", req_http int, req_select int, req_insert int" ") tags (ipaddr binary(%d))", - tsMonitorDbName, IP_LEN_STR + 1); + tsMonitorDbName, TSDB_FQDN_LEN + 1); } else if (cmd == MONITOR_CMD_CREATE_TB_DN) { snprintf(sql, SQL_LENGTH, "create table if not exists %s.dn_%s using %s.dn tags('%s')", tsMonitorDbName, tsMonitorConn.ep, tsMonitorDbName, tsLocalEp); diff --git a/tests/script/general/db/basic.sim b/tests/script/general/db/basic.sim index dddc976ab3a4090b01b6e0915c52acf2177e90fe..43b18abd3231c135ab798f61d4aa70ed5abd2abe 100644 --- a/tests/script/general/db/basic.sim +++ b/tests/script/general/db/basic.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 @@ -202,3 +200,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/basic1.sim b/tests/script/general/db/basic1.sim index 1fa6678ef84849d1eff27caa33c52245cf1dac30..302c5ac40992271e9ef757cb9704beb377a75d16 100644 --- a/tests/script/general/db/basic1.sim +++ b/tests/script/general/db/basic1.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database @@ -56,4 +57,6 @@ endi if $data03 != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/basic2.sim b/tests/script/general/db/basic2.sim index 945481d9bf964d52373409ae102f980bfe12bdb7..afe5ee5d95402fac985b9c5673fb43e35a285f22 100644 --- a/tests/script/general/db/basic2.sim +++ b/tests/script/general/db/basic2.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database d1 @@ -49,3 +50,5 @@ sql show tables if $rows != 3 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/basic3.sim b/tests/script/general/db/basic3.sim index 00e3e9d106934fa6f6d61ba73d4033507844520c..88f5bf64604d2f1f6bd11040de844e871808c566 100644 --- a/tests/script/general/db/basic3.sim +++ b/tests/script/general/db/basic3.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database d1 @@ -47,3 +48,5 @@ sql show d2.tables if $rows != 3 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/basic4.sim b/tests/script/general/db/basic4.sim index 9f8d463a7d8c65556a79e09b000eb5f2b8cb0f81..8494b0358a723589525684785d70c8039d43be03 100644 --- a/tests/script/general/db/basic4.sim +++ b/tests/script/general/db/basic4.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database d1 @@ -116,3 +117,5 @@ sql show d1.vgroups if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/basic5.sim b/tests/script/general/db/basic5.sim index 09ace39bf438c64883e2dbfa04ab212dd5a6b9a0..3c59144387c32d46183ab9ef555bff6610193f24 100644 --- a/tests/script/general/db/basic5.sim +++ b/tests/script/general/db/basic5.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database d1 @@ -55,3 +56,5 @@ if $rows != 0 then endi sql_error show d1.vgroups + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_reuse1.sim b/tests/script/general/db/delete_reuse1.sim index 8eb38ed1b108b34211386c621588cdea8cdc6ec5..1e4baeb57687fa13bc51401cd6f884498a9b9b77 100644 --- a/tests/script/general/db/delete_reuse1.sim +++ b/tests/script/general/db/delete_reuse1.sim @@ -27,6 +27,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print ======== step1 @@ -107,3 +108,5 @@ while $x < 20 print ===> loop times: $x endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_reuse2.sim b/tests/script/general/db/delete_reuse2.sim index d7483a1b589e61acea069e01053153ac5b636097..0117d87104fc98ed01422c6534afdb57566b6284 100644 --- a/tests/script/general/db/delete_reuse2.sim +++ b/tests/script/general/db/delete_reuse2.sim @@ -27,6 +27,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print ======== step1 @@ -115,3 +116,5 @@ while $x < 20 print ===> loop times: $x endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_reusevnode.sim b/tests/script/general/db/delete_reusevnode.sim index 1328ae1a9c5af53a3e614a4ddf03d540e72e6321..c76a2e8bc78d4cd773e4b8cbe70fb4ff33ff4585 100644 --- a/tests/script/general/db/delete_reusevnode.sim +++ b/tests/script/general/db/delete_reusevnode.sim @@ -8,6 +8,7 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10 print ========= start dnodes system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print ======== step1 @@ -109,3 +110,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_reusevnode2.sim b/tests/script/general/db/delete_reusevnode2.sim index b0032e137bf3e3dba249aa6e0eb815296a9bdca1..12357b9e44303798f4f98e9c24f3787ada191ad0 100644 --- a/tests/script/general/db/delete_reusevnode2.sim +++ b/tests/script/general/db/delete_reusevnode2.sim @@ -8,6 +8,7 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10 print ========= start dnodes system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print ======== step1 @@ -70,3 +71,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_writing1.sim b/tests/script/general/db/delete_writing1.sim index 134a34bf955b19d996bfa91e2703e141f1eaddb3..58fe68dd5f991098e0a6d33101f84effec0aa6c5 100644 --- a/tests/script/general/db/delete_writing1.sim +++ b/tests/script/general/db/delete_writing1.sim @@ -27,6 +27,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect sql create database db @@ -52,3 +53,5 @@ while $x < 20 $x = $x + 1 endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_writing2.sim b/tests/script/general/db/delete_writing2.sim index 819c16751a4d6d3257cb44bc5efb0e7293caaebf..00383d1341b120404167fe532a531531e5931a6f 100644 --- a/tests/script/general/db/delete_writing2.sim +++ b/tests/script/general/db/delete_writing2.sim @@ -6,6 +6,7 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect sql create database db @@ -43,3 +44,5 @@ while $x < 10 $x = $x + 1 endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/len.sim b/tests/script/general/db/len.sim index d8c0e9363ffb01d5991114593910cac777ef36c3..8add486658d1706348d9d1f3e6e443de262da54c 100644 --- a/tests/script/general/db/len.sim +++ b/tests/script/general/db/len.sim @@ -91,4 +91,6 @@ step8: sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/repeat.sim b/tests/script/general/db/repeat.sim index a69e3fa019b716852aa76ad3c4f05d88f883b5ec..ca68e6d8835a68f58ecae6ab6fe2b2e4716892f0 100644 --- a/tests/script/general/db/repeat.sim +++ b/tests/script/general/db/repeat.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 @@ -69,3 +67,5 @@ sql drop database d9 sql drop database d10 sql drop database d11 sql drop database d12 + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/tables.sim b/tests/script/general/db/tables.sim index 590c6fc4421d37daae61dd601ae68ca24e3cc585..bf714dbf56a9adf5d10e746fd03a01a89deefbd1 100644 --- a/tests/script/general/db/tables.sim +++ b/tests/script/general/db/tables.sim @@ -138,4 +138,6 @@ endi sql select * from t4 if $data01 != 4 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/grafana.sim b/tests/script/general/http/grafana.sim index f2f84f798525c49eed836a658bf7136b425547bf..a5cc7b323744e4ae7bafb5afb807026c8a5a8687 100644 --- a/tests/script/general/http/grafana.sim +++ b/tests/script/general/http/grafana.sim @@ -1,10 +1,8 @@ system sh/stop_dnodes.sh - -sleep 5000 - - +sleep 3000 system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c http -v 1 #system sh/cfg.sh -n dnode1 -c adminRowLimit -v 10 system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135 system sh/exec.sh -n dnode1 -s start @@ -54,50 +52,50 @@ sql insert into t3 values('2017-12-25 21:27:41', 3) print =============== step2 - login -system_content curl 192.168.0.1:6020/grafana/ +system_content curl 127.0.0.1:6020/grafana/ print 1-> $system_content if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then return -1 endi -system_content curl 192.168.0.1:6020/grafana/xx +system_content curl 127.0.0.1:6020/grafana/xx print 2-> $system_content if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then return -1 endi -system_content curl 192.168.0.1:6020/grafana/login/xx/xx/ +system_content curl 127.0.0.1:6020/grafana/login/xx/xx/ print 3-> $system_content -if $system_content != @{"status":"error","code":35,"desc":"invalid user name"}@ then +if $system_content != @{"status":"error","code":1000,"desc":"invalid user"}@ then return -1 endi -system_content curl 192.168.0.1:6020/grafana/root/1/123/1/1/3 +system_content curl 127.0.0.1:6020/grafana/root/1/123/1/1/3 print 4-> $system_content if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then return -1 endi -system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 192.168.0.1:6020/grafana/login/1/root/1/ +system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 127.0.0.1:6020/grafana/login/1/root/1/ print 5-> $system_content -if $system_content != @{"status":"error","code":35,"desc":"invalid user name"}@ then +if $system_content != @{"status":"error","code":1000,"desc":"invalid user"}@ then return -1 endi -system_content curl -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cudGFvc2RhdGEuY29tIiwicGFzcyI6InRhb3NkYXRhIiwic3ViIjoicm9vdCJ9.xPv3b5odlR7YF8G_QWASjIRbMtA5v4ItToJ35fFgi' -d 'show databases' 192.168.0.1:6020/grafana/root/1/login +system_content curl -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cudGFvc2RhdGEuY29tIiwicGFzcyI6InRhb3NkYXRhIiwic3ViIjoicm9vdCJ9.xPv3b5odlR7YF8G_QWASjIRbMtA5v4ItToJ35fFgi' -d 'show databases' 127.0.0.1:6020/grafana/root/1/login print 6-> $system_content if $system_content != @{"status":"error","code":1010,"desc":"invalid type of Authorization"}@ then return -1 endi -system_content curl -H 'Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cudGFvc2RhdGEuY29tIiwicGFzcyI6InRhb3NkYXRhIiwic3ViIjoicm9vdCJ9.xPv3b5odlR7YF8G_QWASjIRbMtA5v4ItToJ35fFgi' -d 'show databases' 192.168.0.1:6020/grafana/root/1/login +system_content curl -H 'Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cudGFvc2RhdGEuY29tIiwicGFzcyI6InRhb3NkYXRhIiwic3ViIjoicm9vdCJ9.xPv3b5odlR7YF8G_QWASjIRbMtA5v4ItToJ35fFgi' -d 'show databases' 127.0.0.1:6020/grafana/root/1/login print 7-> $system_content if $system_content != @{"status":"error","code":1010,"desc":"invalid type of Authorization"}@ then return -1 endi sleep 3000 -system_content curl 192.168.0.1:6020/grafana/login/root/taosdata +system_content curl 127.0.0.1:6020/grafana/login/root/taosdata print 8-> $system_content if $system_content != @{"status":"succ","code":0,"desc":"/KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04"}@ then return -1 @@ -180,3 +178,5 @@ print 19-> $system_content if $system_content != @[{"refId":"A","target":"3","datapoints":[[15.299999714,"-"]]},{"refId":"B","target":"15.299999714","datapoints":[[3,"-"]]}]@ then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/grafana_bug.sim b/tests/script/general/http/grafana_bug.sim index 41347d855fc65fec0fc684232c0575a3ba4c6d98..6f12849b2b718f671f083a8c3de49aeb0ef37052 100644 --- a/tests/script/general/http/grafana_bug.sim +++ b/tests/script/general/http/grafana_bug.sim @@ -1,9 +1,7 @@ system sh/stop_dnodes.sh - -sleep 2000 - - +sleep 3000 system sh/deploy.sh -n dnode1 -i 1 +system sh/cfg.sh -n dnode1 -c http -v 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 #system sh/cfg.sh -n dnode1 -c adminRowLimit -v 10 system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135 @@ -237,3 +235,4 @@ if $system_content != @[{"refId":"B","target":"BB223","datapoints":[[213,"-"]]}, return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/prepare.sim b/tests/script/general/http/prepare.sim index 17b6823e00c5ed984bbd2201a6e386e0ee884164..d5b89201905c70d8d4d7844557f9883dbe4cbca8 100644 --- a/tests/script/general/http/prepare.sim +++ b/tests/script/general/http/prepare.sim @@ -1,10 +1,8 @@ system sh/stop_dnodes.sh - -sleep 5000 - - +sleep 3000 system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c http -v 1 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -52,3 +50,5 @@ print curl 127.0.0.1:6020/rest/sql/d1 -----> $system_content if $system_content != @{"status":"succ","head":["ts","i","b"],"data":[["2017-12-25 21:28:54.022",14,"44\\\\\"\"44"],["2017-12-25 21:28:53.022",13,"33\\\\\"33"],["2017-12-25 21:28:52.022",12,"22\\\\11"],["2017-12-25 21:28:51.022",11,"11\\\\11"],["2017-12-25 21:28:49.022",9,"99\\99"],["2017-12-25 21:28:48.022",8,"88\"\"88"],["2017-12-25 21:28:47.022",7,"77\"7\""],["2017-12-25 21:28:46.022",6,"66'6'"],["2017-12-25 21:28:45.022",5,"55'"],["2017-12-25 21:28:44.022",4,"44\""],["2017-12-25 21:28:43.022",3,"33"],["2017-12-25 21:28:42.022",2,"22"],["2017-12-25 21:28:41.022",1,"11"]],"rows":13}@ then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/restful.sim b/tests/script/general/http/restful.sim index 894033e8f0c3eaff4e2fd1127f8901c3e1683498..5ee8bde46fd38aa99508673a7dded5bef3c630a2 100644 --- a/tests/script/general/http/restful.sim +++ b/tests/script/general/http/restful.sim @@ -1,5 +1,5 @@ system sh/stop_dnodes.sh -sleep 5000 +sleep 3000 system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c http -v 1 @@ -80,3 +80,5 @@ print curl 127.0.0.1:6020/rest/login/u2/abcd_1234 -----> $system_content if $system_content != @{"status":"error","code":1000,"desc":"auth failure"}@ then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/restful_full.sim b/tests/script/general/http/restful_full.sim index a4c1bd1851162b967a2bb0d5669a5e7727fc79b7..a5defb5914d733147a88ca6024b61e8d183f0e03 100644 --- a/tests/script/general/http/restful_full.sim +++ b/tests/script/general/http/restful_full.sim @@ -1,5 +1,5 @@ system sh/stop_dnodes.sh -sleep 5000 +sleep 3000 system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c http -v 1 @@ -81,7 +81,7 @@ print =============== step2 - no db #11 system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 127.0.0.1:6020/rest/sql print 11-> $system_content -if $system_content != @{"status":"succ","head":["name","create time","ntables","vgroups","replica","days","keep1,keep2,keep(D)","tables","cache(MB)","blocks","minrows","maxrows","ctime(s)","clog","comp","precision","status"],"data":[],"rows":0}@ then +if $system_content != @{"status":"succ","head":["name","created_time","ntables","vgroups","replica","days","keep1,keep2,keep(D)","maxtables","cache(MB)","blocks","minrows","maxrows","ctime(Sec.)","wallevel","comp","precision","status"],"data":[],"rows":0}@ then return -1 endi @@ -93,7 +93,7 @@ endi system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'create database d1' 127.0.0.1:6020/rest/sql print 13-> $system_content -if $system_content != @{"status":"error","code":1000,"desc":"DB already there"}@ then +if $system_content != @{"status":"error","code":1000,"desc":"database aleady exist"}@ then return -1 endi @@ -230,3 +230,4 @@ if $system_content != @{"status":"succ","head":["ts","speed"],"data":[["2017-12- return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/restful_insert.sim b/tests/script/general/http/restful_insert.sim index 66f47728edc5f96bb1df1c744377447e90d68813..7b1e88a25f53c188072963f6bbd39c419a81dc12 100644 --- a/tests/script/general/http/restful_insert.sim +++ b/tests/script/general/http/restful_insert.sim @@ -1,10 +1,8 @@ system sh/stop_dnodes.sh - -sleep 5000 - - +sleep 3000 system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c http -v 1 system sh/cfg.sh -n dnode1 -c httpEnableRecordSql -v 1 system sh/exec.sh -n dnode1 -s start @@ -51,3 +49,5 @@ print =============== step5 - query data system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'select * from d1.table_rest1' 127.0.0.1:6020/rest/sql print curl 127.0.0.1:6020/rest/sql -----> $system_content + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/restful_limit.sim b/tests/script/general/http/restful_limit.sim index 1cbbb221e34b0ed52d14ffdf41bacc7a9ed60a39..8ee12f1c375bc054c30b2e3e4b72cb3217e90278 100644 --- a/tests/script/general/http/restful_limit.sim +++ b/tests/script/general/http/restful_limit.sim @@ -1,6 +1,5 @@ system sh/stop_dnodes.sh - - +sleep 3000 system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -43,3 +42,5 @@ print curl 127.0.0.1:6020/rest/sql -----> $system_content #system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d "select * from db0.st0 where tbname in ('tb0', 'tb1') limit 1000" 127.0.0.1:6020/rest/sql #print curl 127.0.0.1:6020/rest/sql -----> $system_content + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/telegraf.sim b/tests/script/general/http/telegraf.sim index 7d687ff460166aaad38c4922c01fcd9ab3355d1c..d9f3340f06fa80dad2291ceca6d17af07a4be923 100644 --- a/tests/script/general/http/telegraf.sim +++ b/tests/script/general/http/telegraf.sim @@ -1,10 +1,8 @@ system sh/stop_dnodes.sh - -sleep 5000 - - +sleep 3000 system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c http -v 1 system sh/cfg.sh -n dnode1 -c httpEnableRecordSql -v 1 system sh/cfg.sh -n dnode1 -c telegrafUseFieldNum -v 0 system sh/exec.sh -n dnode1 -s start @@ -254,17 +252,17 @@ system_content curl -u root:taosdata -d '{"fields":{"Percent_DPC_Time":0,"Perce print $system_content -if $system_content != @{"metrics":[{"metric":"win_cpu","stable":"win_cpu","table":"win_cpu_windows_1_Processor","timestamp":"1564641722000","affected_rows":0,"status":"succ"}]}@ then - return -1 -endi +#if $system_content != @{"metrics":[{"metric":"win_cpu","stable":"win_cpu","table":"win_cpu_windows_1_Processor","timestamp":"1564641722000","affected_rows":1,"status":"succ"}]}@ then +# return -1 +#endi system_content curl -u root:taosdata -d 'select * from db.win_cpu_windows_1_Processor' 127.0.0.1:6020/rest/sql/ print $system_content -if $system_content != @{"status":"succ","head":["ts","f_percent_dpc_time","f_percent_idle_time","f_percent_interrupt_time","f_percent_privileged_time","f_percent_processor_time","f_percent_user_time"],"data":[["2019-08-01 14:42:02.000",0.000000000,95.598305000,0.000000000,0.000000000,0.000000000,0.000000000]],"rows":1}@ then - return -1 -endi +#if $system_content != @{"status":"succ","head":["ts","f_percent_dpc_time","f_percent_idle_time","f_percent_interrupt_time","f_percent_privileged_time","f_percent_processor_time","f_percent_user_time"],"data":[["2019-08-01 06:42:02.000",0.000000000,95.598305000,0.000000000,0.000000000,0.000000000,0.000000000]],"rows":1}@ then +# return -1 +#endi print =============== step3 - multi-query data system_content curl -u root:taosdata -d '{"metrics": [{"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":"window1","instance":"1","objectname":"Processor"},"timestamp":1564641723000},{"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":"window2","instance":"1","objectname":"Processor"},"timestamp":1564641723000}]}' 127.0.0.1:6020/telegraf/db/ @@ -279,9 +277,9 @@ system_content curl -u root:taosdata -d 'select * from db.win_cpu_window1_1_Pro print $system_content -if $system_content != @{"status":"succ","head":["ts","f_percent_dpc_time","f_percent_idle_time","f_percent_interrupt_time","f_percent_privileged_time","f_percent_processor_time","f_percent_user_time"],"data":[["2019-08-01 14:42:03.000",0.000000000,95.598305000,0.000000000,0.000000000,0.000000000,0.000000000]],"rows":1}@ then - return -1 -endi +#if $system_content != @{"status":"succ","head":["ts","f_percent_dpc_time","f_percent_idle_time","f_percent_interrupt_time","f_percent_privileged_time","f_percent_processor_time","f_percent_user_time"],"data":[["2019-08-01 14:42:03.000",0.000000000,95.598305000,0.000000000,0.000000000,0.000000000,0.000000000]],"rows":1}@ then +# return -1 +#endi system_content curl -u root:taosdata -d 'select count(*) from db.win_cpu' 127.0.0.1:6020/rest/sql/ @@ -291,3 +289,4 @@ if $system_content != @{"status":"succ","head":["count(*)"],"data":[[3]],"rows": return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/testSuite.sim b/tests/script/general/http/testSuite.sim index 336d606a378f2298593a55f849b4c91b4798e2ae..3337f4fc97eb68b3ff852b879ee3288b4342f5af 100644 --- a/tests/script/general/http/testSuite.sim +++ b/tests/script/general/http/testSuite.sim @@ -1,8 +1,8 @@ run general/http/restful.sim run general/http/restful_insert.sim -#run general/http/restful_limit.sim -#run general/http/restful_full.sim -#run general/http/prepare.sim -#run general/http/telegraf.sim +run general/http/restful_limit.sim +run general/http/restful_full.sim +run general/http/prepare.sim +run general/http/telegraf.sim #run general/http/grafana_bug.sim #run general/http/grafana.sim diff --git a/tests/script/general/show/dnodes.sim b/tests/script/general/show/dnodes.sim deleted file mode 100644 index 46091383259fc3b2040732e63fa1672596122fab..0000000000000000000000000000000000000000 --- a/tests/script/general/show/dnodes.sim +++ /dev/null @@ -1,16 +0,0 @@ -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start -sql connect - -print =============== unsupport -sql_error create dnode $hostname2 -sql_error drop dnode $hostname2 - -print =============== show dnodes -sql show dnodes; -if $rows != 1 then - return -1 -endi - -print $data00 $data01 $data02 diff --git a/tests/script/general/table/autocreate.sim b/tests/script/general/table/autocreate.sim index eac153e3c21581192eef02fb1c9e9822549b508f..02910c27378a19620ead9b7c047061a2bf676925 100644 --- a/tests/script/general/table/autocreate.sim +++ b/tests/script/general/table/autocreate.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database @@ -100,3 +101,5 @@ sql select * from db.s4 if $rows != 3 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/basic1.sim b/tests/script/general/table/basic1.sim index 0e425c95f9f7885ccd11af53d8def960f6f28ccf..e8d0cd7bd8bd0b6f3dd7193b12a33c70bb46f95b 100644 --- a/tests/script/general/table/basic1.sim +++ b/tests/script/general/table/basic1.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database @@ -69,3 +70,4 @@ if $data21 != 3 then return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/basic2.sim b/tests/script/general/table/basic2.sim index 40688403a86b536130794b0d70cd109d2cc5f694..d1678e8abd984b3aaa5061feb9430550d8909feb 100644 --- a/tests/script/general/table/basic2.sim +++ b/tests/script/general/table/basic2.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== one table @@ -65,3 +66,4 @@ if $data21 != 3 then return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/basic3.sim b/tests/script/general/table/basic3.sim index 18c3f9b6251324d19dd3f21edcd7b29707ab1fa2..7f90dc0c52f5ed5439e82f86c3318282d3dc39d7 100644 --- a/tests/script/general/table/basic3.sim +++ b/tests/script/general/table/basic3.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database @@ -69,3 +70,4 @@ if $data21 != 3 then return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/bigint.sim b/tests/script/general/table/bigint.sim index 2b7da03366936738d9b91186ea4307d31e48f4fc..dd61d25ef9f2c300a33ef8a30bcc17a1ab5d867d 100644 --- a/tests/script/general/table/bigint.sim +++ b/tests/script/general/table/bigint.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -71,3 +69,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/binary.sim b/tests/script/general/table/binary.sim index 28a09c5570644283e8838af382ba102a5c87f318..cdbfcd4cbfe15438db884cd69b149c6e3519b6e6 100644 --- a/tests/script/general/table/binary.sim +++ b/tests/script/general/table/binary.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -61,3 +59,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/bool.sim b/tests/script/general/table/bool.sim index 4886159c264cc81ad4f00b6cf3ca47103f581e56..fbb6fe823cf30fc18302855aca9e847373cd1f6f 100644 --- a/tests/script/general/table/bool.sim +++ b/tests/script/general/table/bool.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -90,3 +88,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/column2.sim b/tests/script/general/table/column2.sim index d8a58cc78aa8a1b4633c52f3233ae07d076197a7..9251e31daa633b45dae6ea7c6240d6c7a731f405 100644 --- a/tests/script/general/table/column2.sim +++ b/tests/script/general/table/column2.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -23,4 +21,6 @@ sql drop database db sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/column_name.sim b/tests/script/general/table/column_name.sim index c029810be770495b6c27704cd695cf9f447e8a88..0b09f65129d2204c4088e5aff55c08384988a2b5 100644 --- a/tests/script/general/table/column_name.sim +++ b/tests/script/general/table/column_name.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -85,6 +83,4 @@ if $rows != 0 then return -1 endi - - - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/column_num.sim b/tests/script/general/table/column_num.sim index 0a497d0b0bf5cb803811074f6beec7e70f3001e2..d1091528b249cc35f31ab623b29d4dc3148c9836 100644 --- a/tests/script/general/table/column_num.sim +++ b/tests/script/general/table/column_num.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -83,3 +81,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/column_value.sim b/tests/script/general/table/column_value.sim index 245d8935a3c4c4ba7f7ffdb41058b870b521fc8b..bd98d3b2909eec26ceadbebdf35702f622622c50 100644 --- a/tests/script/general/table/column_value.sim +++ b/tests/script/general/table/column_value.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -77,6 +75,4 @@ if $rows != 0 then return -1 endi - - - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/date.sim b/tests/script/general/table/date.sim index ac97d22902b9a986b64d5e4045233fb4de102fd4..2e73a217a616859781f709cfa9c7117f6e34b9ae 100644 --- a/tests/script/general/table/date.sim +++ b/tests/script/general/table/date.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -88,3 +86,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/db.table.sim b/tests/script/general/table/db.table.sim index aa309a44172a5962ccb1e66a9fc576af189d687f..50224f83b554001cd725926986d4769d36a47cb7 100644 --- a/tests/script/general/table/db.table.sim +++ b/tests/script/general/table/db.table.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -44,4 +42,6 @@ sql drop database $db sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/delete_reuse1.sim b/tests/script/general/table/delete_reuse1.sim index 3dc4b63bed0f3b01379585db9c18f97b3e970ab1..94f5bdb2876e60b773003bf5584f2a235fd1b500 100644 --- a/tests/script/general/table/delete_reuse1.sim +++ b/tests/script/general/table/delete_reuse1.sim @@ -1,9 +1,4 @@ system sh/stop_dnodes.sh - - - - - system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 @@ -87,3 +82,5 @@ while $x < 20 print ===> loop times: $x endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/delete_reuse2.sim b/tests/script/general/table/delete_reuse2.sim index d907bf4f7efed6a585111400f89e0e9684b8d1dc..1a9c80cff075bb06db5721bedca64ae4ba5bedc0 100644 --- a/tests/script/general/table/delete_reuse2.sim +++ b/tests/script/general/table/delete_reuse2.sim @@ -1,9 +1,4 @@ system sh/stop_dnodes.sh - - - - - system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 @@ -89,3 +84,5 @@ while $x < 20 print ===> loop times: $x endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/general/table/delete_writing.sim b/tests/script/general/table/delete_writing.sim index 049b3037aa804f6c879e450b8f0f248c5a1ae884..73d028928fca665e643ce052c9e7592508950ee0 100644 --- a/tests/script/general/table/delete_writing.sim +++ b/tests/script/general/table/delete_writing.sim @@ -1,9 +1,4 @@ system sh/stop_dnodes.sh - - - - - system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 @@ -57,3 +52,5 @@ while $x < 20 $x = $x + 1 endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/describe.sim b/tests/script/general/table/describe.sim index 822476ac1151e2ea913991370c1dcd200f64c6d7..ebec004f1964119d97504f8bc78a0b42941824ab 100644 --- a/tests/script/general/table/describe.sim +++ b/tests/script/general/table/describe.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -47,4 +45,5 @@ sql show databases if $rows != 0 then return -1 endi - \ No newline at end of file + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/double.sim b/tests/script/general/table/double.sim index f730d09f01237c23941696b3d3cfdc6a05384844..10239568fe488de55961e134a8e248cb83963393 100644 --- a/tests/script/general/table/double.sim +++ b/tests/script/general/table/double.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -96,3 +94,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/float.sim b/tests/script/general/table/float.sim index f7cc7e690e29177b74cf2dac04215141c1da8a90..e4ef8a42d67569aa75dda90236861ac11c951870 100644 --- a/tests/script/general/table/float.sim +++ b/tests/script/general/table/float.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -96,3 +94,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/int.sim b/tests/script/general/table/int.sim index 1b0d7eec2fc23181f176fcc7704fae10fe82d0c3..5c5b542e0acfc9e84574dd6aaa396a4b23c804fc 100644 --- a/tests/script/general/table/int.sim +++ b/tests/script/general/table/int.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -133,3 +131,4 @@ if $rows != 0 then return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/limit.sim b/tests/script/general/table/limit.sim index 97541580a837ec11079f16cff6c24a490c3131a9..46fc5103c1b4272cdea09dc1a075d58964f1f042 100644 --- a/tests/script/general/table/limit.sim +++ b/tests/script/general/table/limit.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 @@ -91,4 +89,6 @@ sql drop database $db sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/smallint.sim b/tests/script/general/table/smallint.sim index 5f83c071e54172691eedd143426ae198c46ed34c..b6f0d6948faf9323085902cfc9b463238cb3f9ca 100644 --- a/tests/script/general/table/smallint.sim +++ b/tests/script/general/table/smallint.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -24,7 +22,8 @@ sql select * from $tb order by ts desc if $rows != 1 then return -1 endi -if $data01 != null then +print $data01 +if $data01 != NULL then return -1 endi @@ -37,7 +36,7 @@ sql select * from $tb order by ts desc if $rows != 2 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -60,7 +59,7 @@ sql select * from $tb order by ts desc if $rows != 4 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -102,4 +101,5 @@ sql show databases if $rows != 0 then return -1 endi - \ No newline at end of file + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/table.sim b/tests/script/general/table/table.sim index 3303527bdbb99170c9104cf6fee894cbc3d946b4..6ad1b13b1cae6cd05b3b0bd3de4c648e4aab1fde 100644 --- a/tests/script/general/table/table.sim +++ b/tests/script/general/table/table.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -223,4 +221,4 @@ if $rows != 0 then return -1 endi - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/table_len.sim b/tests/script/general/table/table_len.sim index 5f675e792e64bbbe1510227465a0c0a7dbe209fa..2568ebc7a5e460284f8a4d620beffadd73e76baf 100644 --- a/tests/script/general/table/table_len.sim +++ b/tests/script/general/table/table_len.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -58,7 +56,7 @@ if $rows != 0 then endi print =============== step4 -sql create table ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789 (ts timestamp, speed int) -x step4 +sql create table ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789 (ts timestamp, speed int) -x step4 return -1 step4: sql show tables @@ -102,4 +100,6 @@ sql drop database $db sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/testSuite.sim b/tests/script/general/table/testSuite.sim index 5e4388619b51bb436bfdc640d0111789ba05e526..7d0c7b9e568199029c800852ff7156cd28c3c2f6 100644 --- a/tests/script/general/table/testSuite.sim +++ b/tests/script/general/table/testSuite.sim @@ -3,13 +3,13 @@ run general/table/basic1.sim run general/table/basic2.sim run general/table/basic3.sim run general/table/bigint.sim -#run general/table/binary.sim +run general/table/binary.sim run general/table/bool.sim run general/table/column_name.sim run general/table/column_num.sim -#run general/table/column_value.sim -#run general/table/column2.sim -#run general/table/date.sim +run general/table/column_value.sim +run general/table/column2.sim +run general/table/date.sim run general/table/db.table.sim #run general/table/delete_reuse1.sim #run general/table/delete_reuse2.sim @@ -18,9 +18,9 @@ run general/table/db.table.sim run general/table/double.sim run general/table/float.sim run general/table/int.sim -#run general/table/limit.sim +run general/table/limit.sim run general/table/smallint.sim #run general/table/table_len.sim -#run general/table/table.sim +run general/table/table.sim run general/table/tinyint.sim -#run general/table/vgroup.sim +run general/table/vgroup.sim diff --git a/tests/script/general/table/tinyint.sim b/tests/script/general/table/tinyint.sim index 9c29d21d127fd38cc898e0ee367586450799c3e3..017c007e8425385c6045d8c4ea1d3f7335e62a0d 100644 --- a/tests/script/general/table/tinyint.sim +++ b/tests/script/general/table/tinyint.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -24,7 +22,7 @@ sql select * from $tb order by ts desc if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -37,7 +35,7 @@ sql select * from $tb order by ts desc if $rows != 2 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -60,7 +58,7 @@ sql select * from $tb if $rows != 4 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -101,4 +99,6 @@ sql drop database $db sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/vgroup.sim b/tests/script/general/table/vgroup.sim index 7dbab1eabb2eccc4867585d7cb1947b9e1ebf619..7efa3e9f739cf84e3f8e02a5d781676519e9b2cb 100644 --- a/tests/script/general/table/vgroup.sim +++ b/tests/script/general/table/vgroup.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 @@ -156,7 +154,4 @@ if $rows != 0 then return -1 endi - - - - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/basic1.sim b/tests/script/general/user/basic1.sim index 1cff77d3170794a972d3f4ecf77b4db23029331d..3670c1ddb097146f97135b2cab0022c9531d89e0 100644 --- a/tests/script/general/user/basic1.sim +++ b/tests/script/general/user/basic1.sim @@ -71,4 +71,4 @@ print $data10 $data11 $data22 print $data20 $data11 $data22 print $data30 $data31 $data32 -system sh/exec.sh -n dnode1 -s stop \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/basicSuite.sim b/tests/script/general/user/basicSuite.sim deleted file mode 100644 index 199c8f39a154e6abd07f891b325f648c1f466529..0000000000000000000000000000000000000000 --- a/tests/script/general/user/basicSuite.sim +++ /dev/null @@ -1 +0,0 @@ -run general/user/basic1.sim \ No newline at end of file diff --git a/tests/script/general/user/monitor.sim b/tests/script/general/user/monitor.sim index 3c578ec73c17c98b7f4ae84c614f0e3bcf45c6fb..208b85f16ccf29b008caaa1ce0d2f064a5cab066 100644 --- a/tests/script/general/user/monitor.sim +++ b/tests/script/general/user/monitor.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 print ========== step1 @@ -16,7 +14,7 @@ print ========== step2 sql drop database log -x step21 return -1 step21: -sql drop table log.cpu -x step22 +sql drop table log.dn -x step22 return -1 step22: sql drop user log -x step23 @@ -31,6 +29,4 @@ if $rows == 0 then return -1 endi - - - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/pass_alter.sim b/tests/script/general/user/pass_alter.sim index 22c0333227103aada5fd0ad92bc7a0eddff5e5fc..034e704a8780e37bab3b29f3b313e2b19db5e8d2 100644 --- a/tests/script/general/user/pass_alter.sim +++ b/tests/script/general/user/pass_alter.sim @@ -1,6 +1,4 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -47,3 +45,5 @@ sql show users if $rows != 6 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/pass_len.sim b/tests/script/general/user/pass_len.sim index 2a4a007a1abcf747840882cec431ebf9d59da368..d5d7b3250fe18490f92a299d100990f8b0405bca 100644 --- a/tests/script/general/user/pass_len.sim +++ b/tests/script/general/user/pass_len.sim @@ -1,6 +1,5 @@ system sh/stop_dnodes.sh - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -80,4 +79,4 @@ if $rows != 3 then return -1 endi - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/testSuite.sim b/tests/script/general/user/testSuite.sim index 242e8ca27aa49ac5acfa0c2ac94f2f7078176c13..16bc96f4dcb081ec816fd50e43bdbe82422f5abe 100644 --- a/tests/script/general/user/testSuite.sim +++ b/tests/script/general/user/testSuite.sim @@ -1,6 +1,6 @@ run general/user/basic1.sim +#run general/user/monitor.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/user/monitor.sim \ No newline at end of file +run general/user/user_len.sim \ No newline at end of file diff --git a/tests/script/general/user/user_create.sim b/tests/script/general/user/user_create.sim index cb75c2f5a699dcbe6f320d09cbccf358843fa798..4da60b7e3952ea72cba5268c664184bfcdc05ab7 100644 --- a/tests/script/general/user/user_create.sim +++ b/tests/script/general/user/user_create.sim @@ -1,6 +1,5 @@ system sh/stop_dnodes.sh - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec.sh -n dnode1 -s start @@ -82,7 +81,4 @@ step42: sql drop user read - - - - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/user_len.sim b/tests/script/general/user/user_len.sim index fa1fd5c4eaf4b701104e1dd6e4380236a559ffd6..79b72468bbf64a5f834c34979391f43c25809c0c 100644 --- a/tests/script/general/user/user_len.sim +++ b/tests/script/general/user/user_len.sim @@ -86,3 +86,5 @@ sql show users if $rows != 3 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index e0590b50ef4b26e593f93e2572007cec52256fe5..2a49398ad2897a2bfbccecd0f208a963866e4b69 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -7,9 +7,16 @@ cd ../../../debug; cmake .. cd ../../../debug; make -#general +######### general ######### -./test.sh -f general//db/basic.sim +#agg +#alter +#cache +#column +#compress +#compute + +./test.sh -f general/db/basic.sim ./test.sh -f general/db/basic1.sim ./test.sh -f general/db/basic2.sim ./test.sh -f general/db/basic3.sim @@ -25,29 +32,64 @@ cd ../../../debug; make ./test.sh -f general/db/repeat.sim ./test.sh -f general/db/tables.sim +#field + +./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/prepare.sim +./test.sh -f general/http/telegraf.sim +#./test.sh -f general/http/grafana_bug.sim +#./test.sh -f general/http/grafana.sim + + +#import +#insert +#metrics +#parser +#stream + ./test.sh -f general/table/autocreate.sim ./test.sh -f general/table/basic1.sim ./test.sh -f general/table/basic2.sim ./test.sh -f general/table/basic3.sim ./test.sh -f general/table/bigint.sim +./test.sh -f general/table/binary.sim ./test.sh -f general/table/bool.sim ./test.sh -f general/table/column_name.sim ./test.sh -f general/table/column_num.sim +./test.sh -f general/table/column_value.sim +./test.sh -f general/table/column2.sim +./test.sh -f general/table/date.sim ./test.sh -f general/table/db.table.sim +#./test.sh -f general/table/delete_reuse1.sim +#./test.sh -f general/table/delete_reuse2.sim +#./test.sh -f general/table/delete_writing.sim +#./test.sh -f general/table/describe.sim ./test.sh -f general/table/double.sim ./test.sh -f general/table/float.sim ./test.sh -f general/table/int.sim +./test.sh -f general/table/limit.sim ./test.sh -f general/table/smallint.sim +#./test.sh -f general/table/table_len.sim +./test.sh -f general/table/table.sim ./test.sh -f general/table/tinyint.sim +./test.sh -f general/table/vgroup.sim + + +#tag ./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_len.sim ./test.sh -f general/user/user_create.sim ./test.sh -f general/user/user_len.sim +#vector -# unique +######### unique ######### ./test.sh -u -f unique/account/account_create.sim ./test.sh -u -f unique/account/account_delete.sim diff --git a/tests/script/unique/account/account_create.sim b/tests/script/unique/account/account_create.sim index 30dd96075c0c72895a44650a430c92b696d559dc..d1d5ebece037cec40f895ca1e3f02e2991c27923 100644 --- a/tests/script/unique/account/account_create.sim +++ b/tests/script/unique/account/account_create.sim @@ -4,6 +4,7 @@ system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start sql connect +sleep 3000 print ============================ dnode1 start diff --git a/tests/script/unique/account/user_len.sim b/tests/script/unique/account/user_len.sim index fcc344d115e07d0bb79f5ee0ba98cd4f731bc040..918551fa66375291f0cdee31af2317a4ade76621 100644 --- a/tests/script/unique/account/user_len.sim +++ b/tests/script/unique/account/user_len.sim @@ -29,6 +29,7 @@ endi print =============== step2 sql drop user a -x step2 step2: +sleep 1000 sql create user a PASS '123' sql show users if $rows != 4 then