提交 c7a06693 编写于 作者: J jtao1735

Merge branch 'develop' into feature/unified

...@@ -811,20 +811,20 @@ static SDbCfg mgmtGetAlterDbOption(SDbObj *pDb, SCMAlterDbMsg *pAlter) { ...@@ -811,20 +811,20 @@ static SDbCfg mgmtGetAlterDbOption(SDbObj *pDb, SCMAlterDbMsg *pAlter) {
if (replications > 0 && replications != pDb->cfg.replications) { if (replications > 0 && replications != pDb->cfg.replications) {
mTrace("db:%s, replications:%d change to %d", pDb->name, pDb->cfg.replications, replications); mTrace("db:%s, replications:%d change to %d", pDb->name, pDb->cfg.replications, replications);
newCfg.replications = replications; newCfg.replications = replications;
}
if (replications > mgmtGetDnodesNum()) { if (replications > mgmtGetDnodesNum()) {
mError("db:%s, no enough dnode to change replica:%d", pDb->name, replications); mError("db:%s, no enough dnode to change replica:%d", pDb->name, replications);
terrno = TSDB_CODE_NO_ENOUGH_DNODES; terrno = TSDB_CODE_NO_ENOUGH_DNODES;
} }
if (pDb->cfg.replications - replications >= 2) { if (pDb->cfg.replications - replications >= 2) {
mError("db:%s, replica number can't change from 3 to 1", pDb->name, replications); mError("db:%s, replica number can't change from 3 to 1", pDb->name, replications);
terrno = TSDB_CODE_INVALID_OPTION; terrno = TSDB_CODE_INVALID_OPTION;
}
} }
if (walLevel < TSDB_MIN_WAL_LEVEL || walLevel > TSDB_MAX_WAL_LEVEL) { if (walLevel > 0 && (walLevel < TSDB_MIN_WAL_LEVEL || walLevel > TSDB_MAX_WAL_LEVEL)) {
mError("db:%s, wal level should be between 0-2", pDb->name); mError("db:%s, wal level %d should be between 0-2, origin:%d", pDb->name, walLevel, pDb->cfg.walLevel);
terrno = TSDB_CODE_INVALID_OPTION; terrno = TSDB_CODE_INVALID_OPTION;
} }
......
...@@ -269,11 +269,12 @@ void httpCleanUpConnect(HttpServer *pServer) { ...@@ -269,11 +269,12 @@ void httpCleanUpConnect(HttpServer *pServer) {
for (i = 0; i < pServer->numOfThreads; ++i) { for (i = 0; i < pServer->numOfThreads; ++i) {
pThread = pServer->pThreads + i; pThread = pServer->pThreads + i;
if (pThread == NULL) continue;
//taosCloseSocket(pThread->pollFd); //taosCloseSocket(pThread->pollFd);
while (pThread->pHead) { //while (pThread->pHead) {
httpCleanUpContext(pThread->pHead, 0); // httpCleanUpContext(pThread->pHead, 0);
} //}
pthread_cancel(pThread->thread); pthread_cancel(pThread->thread);
pthread_join(pThread->thread, NULL); pthread_join(pThread->thread, NULL);
......
...@@ -131,7 +131,11 @@ void httpCleanUpSystem() { ...@@ -131,7 +131,11 @@ void httpCleanUpSystem() {
httpServer->timerHandle = NULL; httpServer->timerHandle = NULL;
} }
httpCleanUpConnect(httpServer); if (httpServer->pThreads != NULL) {
httpCleanUpConnect(httpServer);
httpServer->pThreads = NULL;
}
#if 0 #if 0
httpRemoveAllSessions(httpServer); httpRemoveAllSessions(httpServer);
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#define SQL_LENGTH 1024 #define SQL_LENGTH 1024
#define LOG_LEN_STR 80 #define LOG_LEN_STR 80
#define IP_LEN_STR 15 #define IP_LEN_STR 18
#define CHECK_INTERVAL 1000 #define CHECK_INTERVAL 1000
typedef enum { typedef enum {
...@@ -115,6 +115,13 @@ static void monitorInitConn(void *para, void *unused) { ...@@ -115,6 +115,13 @@ static void monitorInitConn(void *para, void *unused) {
if (tsMonitorConn.ep[0] == 0) if (tsMonitorConn.ep[0] == 0)
strcpy(tsMonitorConn.ep, tsLocalEp); 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) { if (tsMonitorConn.conn == NULL) {
taos_connect_a(NULL, "monitor", tsInternalPass, "", 0, monitorInitConnCb, &tsMonitorConn, &(tsMonitorConn.conn)); taos_connect_a(NULL, "monitor", tsInternalPass, "", 0, monitorInitConnCb, &tsMonitorConn, &(tsMonitorConn.conn));
} else { } else {
...@@ -141,8 +148,8 @@ static void dnodeBuildMonitorSql(char *sql, int32_t cmd) { ...@@ -141,8 +148,8 @@ static void dnodeBuildMonitorSql(char *sql, int32_t cmd) {
if (cmd == MONITOR_CMD_CREATE_DB) { if (cmd == MONITOR_CMD_CREATE_DB) {
snprintf(sql, SQL_LENGTH, snprintf(sql, SQL_LENGTH,
"create database if not exists %s replica 1 days 10 keep 30 rows 1024 cache 2048 " "create database if not exists %s replica 1 days 10 keep 30 cache 2 "
"ablocks 2 tblocks 32 tables 32 precision 'us'", "blocks 2 maxtables 32 precision 'us'",
tsMonitorDbName); tsMonitorDbName);
} else if (cmd == MONITOR_CMD_CREATE_MT_DN) { } else if (cmd == MONITOR_CMD_CREATE_MT_DN) {
snprintf(sql, SQL_LENGTH, snprintf(sql, SQL_LENGTH,
...@@ -154,7 +161,7 @@ static void dnodeBuildMonitorSql(char *sql, int32_t cmd) { ...@@ -154,7 +161,7 @@ static void dnodeBuildMonitorSql(char *sql, int32_t cmd) {
", io_read float, io_write float" ", io_read float, io_write float"
", req_http int, req_select int, req_insert int" ", req_http int, req_select int, req_insert int"
") tags (ipaddr binary(%d))", ") tags (ipaddr binary(%d))",
tsMonitorDbName, IP_LEN_STR + 1); tsMonitorDbName, TSDB_FQDN_LEN + 1);
} else if (cmd == MONITOR_CMD_CREATE_TB_DN) { } 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, snprintf(sql, SQL_LENGTH, "create table if not exists %s.dn_%s using %s.dn tags('%s')", tsMonitorDbName,
tsMonitorConn.ep, tsMonitorDbName, tsLocalEp); tsMonitorConn.ep, tsMonitorDbName, tsLocalEp);
......
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 wallevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
...@@ -202,3 +200,5 @@ sql show databases ...@@ -202,3 +200,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print =============== create database print =============== create database
...@@ -56,4 +57,6 @@ endi ...@@ -56,4 +57,6 @@ endi
if $data03 != 0 then if $data03 != 0 then
return -1 return -1
endi endi
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print =============== create database d1 print =============== create database d1
...@@ -49,3 +50,5 @@ sql show tables ...@@ -49,3 +50,5 @@ sql show tables
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print =============== create database d1 print =============== create database d1
...@@ -47,3 +48,5 @@ sql show d2.tables ...@@ -47,3 +48,5 @@ sql show d2.tables
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print =============== create database d1 print =============== create database d1
...@@ -116,3 +117,5 @@ sql show d1.vgroups ...@@ -116,3 +117,5 @@ sql show d1.vgroups
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print =============== create database d1 print =============== create database d1
...@@ -55,3 +56,5 @@ if $rows != 0 then ...@@ -55,3 +56,5 @@ if $rows != 0 then
endi endi
sql_error show d1.vgroups sql_error show d1.vgroups
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -27,6 +27,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 ...@@ -27,6 +27,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes print ========= start dnodes
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print ======== step1 print ======== step1
...@@ -107,3 +108,5 @@ while $x < 20 ...@@ -107,3 +108,5 @@ while $x < 20
print ===> loop times: $x print ===> loop times: $x
endw endw
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -27,6 +27,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 ...@@ -27,6 +27,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes print ========= start dnodes
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print ======== step1 print ======== step1
...@@ -115,3 +116,5 @@ while $x < 20 ...@@ -115,3 +116,5 @@ while $x < 20
print ===> loop times: $x print ===> loop times: $x
endw endw
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -8,6 +8,7 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10 ...@@ -8,6 +8,7 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
print ========= start dnodes print ========= start dnodes
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print ======== step1 print ======== step1
...@@ -109,3 +110,5 @@ sql show databases ...@@ -109,3 +110,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -8,6 +8,7 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10 ...@@ -8,6 +8,7 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
print ========= start dnodes print ========= start dnodes
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print ======== step1 print ======== step1
...@@ -70,3 +71,5 @@ sql show databases ...@@ -70,3 +71,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -27,6 +27,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 ...@@ -27,6 +27,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
print ========= start dnodes print ========= start dnodes
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
sql create database db sql create database db
...@@ -52,3 +53,5 @@ while $x < 20 ...@@ -52,3 +53,5 @@ while $x < 20
$x = $x + 1 $x = $x + 1
endw endw
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -6,6 +6,7 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 ...@@ -6,6 +6,7 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
print ========= start dnodes print ========= start dnodes
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
sql create database db sql create database db
...@@ -43,3 +44,5 @@ while $x < 10 ...@@ -43,3 +44,5 @@ while $x < 10
$x = $x + 1 $x = $x + 1
endw endw
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -91,4 +91,6 @@ step8: ...@@ -91,4 +91,6 @@ step8:
sql show databases sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 wallevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
...@@ -69,3 +67,5 @@ sql drop database d9 ...@@ -69,3 +67,5 @@ sql drop database d9
sql drop database d10 sql drop database d10
sql drop database d11 sql drop database d11
sql drop database d12 sql drop database d12
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -138,4 +138,6 @@ endi ...@@ -138,4 +138,6 @@ endi
sql select * from t4 sql select * from t4
if $data01 != 4 then if $data01 != 4 then
return -1 return -1
endi endi
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
sleep 3000
sleep 5000
system sh/deploy.sh -n dnode1 -i 1 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 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 adminRowLimit -v 10
system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135 system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -54,50 +52,50 @@ sql insert into t3 values('2017-12-25 21:27:41', 3) ...@@ -54,50 +52,50 @@ sql insert into t3 values('2017-12-25 21:27:41', 3)
print =============== step2 - login 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 print 1-> $system_content
if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then
return -1 return -1
endi 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 print 2-> $system_content
if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then
return -1 return -1
endi 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 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 return -1
endi 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 print 4-> $system_content
if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then
return -1 return -1
endi 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 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 return -1
endi 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 print 6-> $system_content
if $system_content != @{"status":"error","code":1010,"desc":"invalid type of Authorization"}@ then if $system_content != @{"status":"error","code":1010,"desc":"invalid type of Authorization"}@ then
return -1 return -1
endi 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 print 7-> $system_content
if $system_content != @{"status":"error","code":1010,"desc":"invalid type of Authorization"}@ then if $system_content != @{"status":"error","code":1010,"desc":"invalid type of Authorization"}@ then
return -1 return -1
endi endi
sleep 3000 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 print 8-> $system_content
if $system_content != @{"status":"succ","code":0,"desc":"/KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04"}@ then if $system_content != @{"status":"succ","code":0,"desc":"/KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04"}@ then
return -1 return -1
...@@ -180,3 +178,5 @@ print 19-> $system_content ...@@ -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 if $system_content != @[{"refId":"A","target":"3","datapoints":[[15.299999714,"-"]]},{"refId":"B","target":"15.299999714","datapoints":[[3,"-"]]}]@ then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
sleep 3000
sleep 2000
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
#system sh/cfg.sh -n dnode1 -c adminRowLimit -v 10 #system sh/cfg.sh -n dnode1 -c adminRowLimit -v 10
system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135 system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135
...@@ -237,3 +235,4 @@ if $system_content != @[{"refId":"B","target":"BB223","datapoints":[[213,"-"]]}, ...@@ -237,3 +235,4 @@ if $system_content != @[{"refId":"B","target":"BB223","datapoints":[[213,"-"]]},
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
sleep 3000
sleep 5000
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/cfg.sh -n dnode1 -c http -v 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000 sleep 3000
...@@ -52,3 +50,5 @@ print curl 127.0.0.1:6020/rest/sql/d1 -----> $system_content ...@@ -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 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 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
sleep 5000 sleep 3000
system sh/deploy.sh -n dnode1 -i 1 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 wallevel -v 0
system sh/cfg.sh -n dnode1 -c http -v 1 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 ...@@ -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 if $system_content != @{"status":"error","code":1000,"desc":"auth failure"}@ then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
sleep 5000 sleep 3000
system sh/deploy.sh -n dnode1 -i 1 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 wallevel -v 0
system sh/cfg.sh -n dnode1 -c http -v 1 system sh/cfg.sh -n dnode1 -c http -v 1
...@@ -81,7 +81,7 @@ print =============== step2 - no db ...@@ -81,7 +81,7 @@ print =============== step2 - no db
#11 #11
system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 127.0.0.1:6020/rest/sql system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 127.0.0.1:6020/rest/sql
print 11-> $system_content 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 return -1
endi endi
...@@ -93,7 +93,7 @@ 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 system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'create database d1' 127.0.0.1:6020/rest/sql
print 13-> $system_content 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 return -1
endi endi
...@@ -230,3 +230,4 @@ if $system_content != @{"status":"succ","head":["ts","speed"],"data":[["2017-12- ...@@ -230,3 +230,4 @@ if $system_content != @{"status":"succ","head":["ts","speed"],"data":[["2017-12-
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
sleep 3000
sleep 5000
system sh/deploy.sh -n dnode1 -i 1 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 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 httpEnableRecordSql -v 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -51,3 +49,5 @@ print =============== step5 - query data ...@@ -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 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 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
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
sleep 3000
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -43,3 +42,5 @@ print curl 127.0.0.1:6020/rest/sql -----> $system_content ...@@ -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 #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 #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
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
sleep 3000
sleep 5000
system sh/deploy.sh -n dnode1 -i 1 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 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 httpEnableRecordSql -v 1
system sh/cfg.sh -n dnode1 -c telegrafUseFieldNum -v 0 system sh/cfg.sh -n dnode1 -c telegrafUseFieldNum -v 0
system sh/exec.sh -n dnode1 -s start 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 ...@@ -254,17 +252,17 @@ system_content curl -u root:taosdata -d '{"fields":{"Percent_DPC_Time":0,"Perce
print $system_content 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 #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 # return -1
endi #endi
system_content curl -u root:taosdata -d 'select * from db.win_cpu_windows_1_Processor' 127.0.0.1:6020/rest/sql/ 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 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 #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 # return -1
endi #endi
print =============== step3 - multi-query data 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/ 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 ...@@ -279,9 +277,9 @@ system_content curl -u root:taosdata -d 'select * from db.win_cpu_window1_1_Pro
print $system_content 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 #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 # return -1
endi #endi
system_content curl -u root:taosdata -d 'select count(*) from db.win_cpu' 127.0.0.1:6020/rest/sql/ 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": ...@@ -291,3 +289,4 @@ if $system_content != @{"status":"succ","head":["count(*)"],"data":[[3]],"rows":
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
run general/http/restful.sim run general/http/restful.sim
run general/http/restful_insert.sim run general/http/restful_insert.sim
#run general/http/restful_limit.sim run general/http/restful_limit.sim
#run general/http/restful_full.sim run general/http/restful_full.sim
#run general/http/prepare.sim run general/http/prepare.sim
#run general/http/telegraf.sim run general/http/telegraf.sim
#run general/http/grafana_bug.sim #run general/http/grafana_bug.sim
#run general/http/grafana.sim #run general/http/grafana.sim
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
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print =============== create database print =============== create database
...@@ -100,3 +101,5 @@ sql select * from db.s4 ...@@ -100,3 +101,5 @@ sql select * from db.s4
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print =============== create database print =============== create database
...@@ -69,3 +70,4 @@ if $data21 != 3 then ...@@ -69,3 +70,4 @@ if $data21 != 3 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print =============== one table print =============== one table
...@@ -65,3 +66,4 @@ if $data21 != 3 then ...@@ -65,3 +66,4 @@ if $data21 != 3 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect sql connect
print =============== create database print =============== create database
...@@ -69,3 +70,4 @@ if $data21 != 3 then ...@@ -69,3 +70,4 @@ if $data21 != 3 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -71,3 +69,5 @@ sql show databases ...@@ -71,3 +69,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -61,3 +59,5 @@ sql show databases ...@@ -61,3 +59,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -90,3 +88,5 @@ sql show databases ...@@ -90,3 +88,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -23,4 +21,6 @@ sql drop database db ...@@ -23,4 +21,6 @@ sql drop database db
sql show databases sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -85,6 +83,4 @@ if $rows != 0 then ...@@ -85,6 +83,4 @@ if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -83,3 +81,5 @@ sql show databases ...@@ -83,3 +81,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -77,6 +75,4 @@ if $rows != 0 then ...@@ -77,6 +75,4 @@ if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -88,3 +86,5 @@ sql show databases ...@@ -88,3 +86,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -44,4 +42,6 @@ sql drop database $db ...@@ -44,4 +42,6 @@ sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode3 -i 3
...@@ -87,3 +82,5 @@ while $x < 20 ...@@ -87,3 +82,5 @@ while $x < 20
print ===> loop times: $x print ===> loop times: $x
endw endw
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode3 -i 3
...@@ -89,3 +84,5 @@ while $x < 20 ...@@ -89,3 +84,5 @@ while $x < 20
print ===> loop times: $x print ===> loop times: $x
endw endw
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode3 -i 3
...@@ -57,3 +52,5 @@ while $x < 20 ...@@ -57,3 +52,5 @@ while $x < 20
$x = $x + 1 $x = $x + 1
endw endw
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -47,4 +45,5 @@ sql show databases ...@@ -47,4 +45,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
\ No newline at end of file system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -96,3 +94,5 @@ sql show databases ...@@ -96,3 +94,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -96,3 +94,5 @@ sql show databases ...@@ -96,3 +94,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -133,3 +131,4 @@ if $rows != 0 then ...@@ -133,3 +131,4 @@ if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8
...@@ -91,4 +89,6 @@ sql drop database $db ...@@ -91,4 +89,6 @@ sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -24,7 +22,8 @@ sql select * from $tb order by ts desc ...@@ -24,7 +22,8 @@ sql select * from $tb order by ts desc
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
if $data01 != null then print $data01
if $data01 != NULL then
return -1 return -1
endi endi
...@@ -37,7 +36,7 @@ sql select * from $tb order by ts desc ...@@ -37,7 +36,7 @@ sql select * from $tb order by ts desc
if $rows != 2 then if $rows != 2 then
return -1 return -1
endi endi
if $data01 != null then if $data01 != NULL then
return -1 return -1
endi endi
...@@ -60,7 +59,7 @@ sql select * from $tb order by ts desc ...@@ -60,7 +59,7 @@ sql select * from $tb order by ts desc
if $rows != 4 then if $rows != 4 then
return -1 return -1
endi endi
if $data01 != null then if $data01 != NULL then
return -1 return -1
endi endi
...@@ -102,4 +101,5 @@ sql show databases ...@@ -102,4 +101,5 @@ sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
\ No newline at end of file system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -223,4 +221,4 @@ if $rows != 0 then ...@@ -223,4 +221,4 @@ if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -58,7 +56,7 @@ if $rows != 0 then ...@@ -58,7 +56,7 @@ if $rows != 0 then
endi endi
print =============== step4 print =============== step4
sql create table ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789 (ts timestamp, speed int) -x step4 sql create table ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789 (ts timestamp, speed int) -x step4
return -1 return -1
step4: step4:
sql show tables sql show tables
...@@ -102,4 +100,6 @@ sql drop database $db ...@@ -102,4 +100,6 @@ sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -3,13 +3,13 @@ run general/table/basic1.sim ...@@ -3,13 +3,13 @@ run general/table/basic1.sim
run general/table/basic2.sim run general/table/basic2.sim
run general/table/basic3.sim run general/table/basic3.sim
run general/table/bigint.sim run general/table/bigint.sim
#run general/table/binary.sim run general/table/binary.sim
run general/table/bool.sim run general/table/bool.sim
run general/table/column_name.sim run general/table/column_name.sim
run general/table/column_num.sim run general/table/column_num.sim
#run general/table/column_value.sim run general/table/column_value.sim
#run general/table/column2.sim run general/table/column2.sim
#run general/table/date.sim run general/table/date.sim
run general/table/db.table.sim run general/table/db.table.sim
#run general/table/delete_reuse1.sim #run general/table/delete_reuse1.sim
#run general/table/delete_reuse2.sim #run general/table/delete_reuse2.sim
...@@ -18,9 +18,9 @@ run general/table/db.table.sim ...@@ -18,9 +18,9 @@ run general/table/db.table.sim
run general/table/double.sim run general/table/double.sim
run general/table/float.sim run general/table/float.sim
run general/table/int.sim run general/table/int.sim
#run general/table/limit.sim run general/table/limit.sim
run general/table/smallint.sim run general/table/smallint.sim
#run general/table/table_len.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/tinyint.sim
#run general/table/vgroup.sim run general/table/vgroup.sim
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -24,7 +22,7 @@ sql select * from $tb order by ts desc ...@@ -24,7 +22,7 @@ sql select * from $tb order by ts desc
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
if $data01 != null then if $data01 != NULL then
return -1 return -1
endi endi
...@@ -37,7 +35,7 @@ sql select * from $tb order by ts desc ...@@ -37,7 +35,7 @@ sql select * from $tb order by ts desc
if $rows != 2 then if $rows != 2 then
return -1 return -1
endi endi
if $data01 != null then if $data01 != NULL then
return -1 return -1
endi endi
...@@ -60,7 +58,7 @@ sql select * from $tb ...@@ -60,7 +58,7 @@ sql select * from $tb
if $rows != 4 then if $rows != 4 then
return -1 return -1
endi endi
if $data01 != null then if $data01 != NULL then
return -1 return -1
endi endi
...@@ -101,4 +99,6 @@ sql drop database $db ...@@ -101,4 +99,6 @@ sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 0 then
return -1 return -1
endi endi
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
...@@ -156,7 +154,4 @@ if $rows != 0 then ...@@ -156,7 +154,4 @@ if $rows != 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -71,4 +71,4 @@ print $data10 $data11 $data22 ...@@ -71,4 +71,4 @@ print $data10 $data11 $data22
print $data20 $data11 $data22 print $data20 $data11 $data22
print $data30 $data31 $data32 print $data30 $data31 $data32
system sh/exec.sh -n dnode1 -s stop system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file \ No newline at end of file
run general/user/basic1.sim
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
print ========== step1 print ========== step1
...@@ -16,7 +14,7 @@ print ========== step2 ...@@ -16,7 +14,7 @@ print ========== step2
sql drop database log -x step21 sql drop database log -x step21
return -1 return -1
step21: step21:
sql drop table log.cpu -x step22 sql drop table log.dn -x step22
return -1 return -1
step22: step22:
sql drop user log -x step23 sql drop user log -x step23
...@@ -31,6 +29,4 @@ if $rows == 0 then ...@@ -31,6 +29,4 @@ if $rows == 0 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 wallevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -47,3 +45,5 @@ sql show users ...@@ -47,3 +45,5 @@ sql show users
if $rows != 6 then if $rows != 6 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 wallevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -80,4 +79,4 @@ if $rows != 3 then ...@@ -80,4 +79,4 @@ if $rows != 3 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
run general/user/basic1.sim run general/user/basic1.sim
#run general/user/monitor.sim
run general/user/pass_alter.sim run general/user/pass_alter.sim
run general/user/pass_len.sim run general/user/pass_len.sim
run general/user/user_create.sim run general/user/user_create.sim
run general/user/user_len.sim run general/user/user_len.sim
#run general/user/monitor.sim \ No newline at end of file
\ No newline at end of file
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 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 wallevel -v 0
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
...@@ -82,7 +81,4 @@ step42: ...@@ -82,7 +81,4 @@ step42:
sql drop user read sql drop user read
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -86,3 +86,5 @@ sql show users ...@@ -86,3 +86,5 @@ sql show users
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
...@@ -7,9 +7,16 @@ cd ../../../debug; cmake .. ...@@ -7,9 +7,16 @@ cd ../../../debug; cmake ..
cd ../../../debug; make 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/basic1.sim
./test.sh -f general/db/basic2.sim ./test.sh -f general/db/basic2.sim
./test.sh -f general/db/basic3.sim ./test.sh -f general/db/basic3.sim
...@@ -25,29 +32,64 @@ cd ../../../debug; make ...@@ -25,29 +32,64 @@ cd ../../../debug; make
./test.sh -f general/db/repeat.sim ./test.sh -f general/db/repeat.sim
./test.sh -f general/db/tables.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/autocreate.sim
./test.sh -f general/table/basic1.sim ./test.sh -f general/table/basic1.sim
./test.sh -f general/table/basic2.sim ./test.sh -f general/table/basic2.sim
./test.sh -f general/table/basic3.sim ./test.sh -f general/table/basic3.sim
./test.sh -f general/table/bigint.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/bool.sim
./test.sh -f general/table/column_name.sim ./test.sh -f general/table/column_name.sim
./test.sh -f general/table/column_num.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/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/double.sim
./test.sh -f general/table/float.sim ./test.sh -f general/table/float.sim
./test.sh -f general/table/int.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/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/tinyint.sim
./test.sh -f general/table/vgroup.sim
#tag
./test.sh -f general/user/basic1.sim ./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/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/user/user_len.sim
#vector
# unique ######### unique #########
./test.sh -u -f unique/account/account_create.sim ./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
......
...@@ -4,6 +4,7 @@ system sh/cfg.sh -n dnode1 -c wallevel -v 0 ...@@ -4,6 +4,7 @@ system sh/cfg.sh -n dnode1 -c wallevel -v 0
system sh/exec_up.sh -n dnode1 -s start system sh/exec_up.sh -n dnode1 -s start
sql connect sql connect
sleep 3000
print ============================ dnode1 start print ============================ dnode1 start
......
...@@ -29,6 +29,7 @@ endi ...@@ -29,6 +29,7 @@ endi
print =============== step2 print =============== step2
sql drop user a -x step2 sql drop user a -x step2
step2: step2:
sleep 1000
sql create user a PASS '123' sql create user a PASS '123'
sql show users sql show users
if $rows != 4 then if $rows != 4 then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册