diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py index 8509136a3443a1bc13bbaac0cc073363c14a7186..23b6341e66139e4514c812ff98297db0376ee030 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py @@ -25,7 +25,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py b/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py index 1d21c517e60715f88ddab265a1a380d4601edd80..4473ff2c2de7927b6db6f032f0b470d220f9e34c 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/custom_col_tag.py b/tests/develop-test/5-taos-tools/taosbenchmark/custom_col_tag.py index 9104d6309611916cbd88a1d61a1446bf54a25859..4f8e94a887eebe02d0e8a7078140c5c580124720 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/custom_col_tag.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/custom_col_tag.py @@ -24,7 +24,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py index c68375894c6f34bdccc33789384f6113aeb6e105..95afdc413e0cd40b3662e99bf02ad9f08f6fb4a1 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py @@ -23,7 +23,7 @@ class TDTestCase: [TD-11510] taosBenchmark test cases """ - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/demo.py b/tests/develop-test/5-taos-tools/taosbenchmark/demo.py index a44ad4c1d0b5cc8e4ba181c1bf941454929f2df6..90d0ffd8b1602c62120c186a1f10e386d3f39c6f 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/demo.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/demo.py @@ -27,7 +27,7 @@ class TDTestCase: """ return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py index 38332f7b64003c2595910fc7632c2a88fc3d9747..7437b46353fcefc5568ed78da920d646b311a214 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py @@ -24,7 +24,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py b/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py index ebddff56436c53ca1f15b714e58204aaeeee6c89..a706967bc12d761667b2873bd581e98163260a35 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py @@ -24,7 +24,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/json_tag.py b/tests/develop-test/5-taos-tools/taosbenchmark/json_tag.py index 5f25e0229b1033a13c12b82b06669d43a156cf8e..3b9123974f7aa3f5f3440533837275ea90bec331 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/json_tag.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/json_tag.py @@ -24,7 +24,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/limit_offset_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/limit_offset_json.py index 47a60e475725123f877b055d699ab217bbb77236..dbddb840ca72154e326ce538c35316b602c31643 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/limit_offset_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/limit_offset_json.py @@ -24,7 +24,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py index 84d9433967abb07baecb5da0870d97ff9c066f20..7f0b082e33bd74e01b6e488bd05d86c070a7053a 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py @@ -29,7 +29,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/sample_csv_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/sample_csv_json.py index 772bb11df4e43171d5bffd3668a6124a0bf6bd12..5b59d84b79ce98eb189dcae59e9c3fc6a41090f2 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/sample_csv_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/sample_csv_json.py @@ -24,7 +24,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/sml_interlace.py b/tests/develop-test/5-taos-tools/taosbenchmark/sml_interlace.py index fec93765297c715b2aa33846c0a9b15fccd7ec1f..ee7bb8a925db9ac4e09572c5c122f19485e24bd9 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/sml_interlace.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/sml_interlace.py @@ -24,7 +24,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py b/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py index 557d2a4884f674c15e602a665836c46564e00d47..d7ccdc2716555219b121217c44d39c6766c29411 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py @@ -24,7 +24,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/sml_telnet_alltypes.py b/tests/develop-test/5-taos-tools/taosbenchmark/sml_telnet_alltypes.py index 8ff56b533902c70f9b2ac72b680446c14488fffc..7b0f5d16721acf7d72ea78e720d9ca276503e529 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/sml_telnet_alltypes.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/sml_telnet_alltypes.py @@ -24,7 +24,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/taosadapter_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/taosadapter_json.py index 3f0a05b66590bf1af74cc35676a4cbf3caacfe72..1588b4077c4f047db0283648ab168e5e7c628994 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/taosadapter_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/taosadapter_json.py @@ -25,7 +25,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/telnet_tcp.py b/tests/develop-test/5-taos-tools/taosbenchmark/telnet_tcp.py index 7aa0575f77625685631b691e578dcb365d94b1a6..b8d4c35e585e15cd96c59b563903a270344efe16 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/telnet_tcp.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/telnet_tcp.py @@ -25,7 +25,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py index 33ba4034ec07925574c5c8bd23a2d7951010980c..09976953e1ac03ce1e7d7649f848136298f37fd2 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py index 75885edf9f2984504c01ecc02b2aa079db34fbaf..7eaddd9e2d72316e8d14fe2497ee64e838f15d8a 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py index 41d4ba128d9d1c3c5d749e4696b71303cf15e2e7..c70748e9c23177450f307728d0ebde5311d2a005 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py index 043fb49af3cdb24b78a327bd7ca06d524218e8fb..eb4b8a364ada425406c45b65a43fdb2cd4785f09 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py index 1eaa2bbfff541e1e76be0fa74a13de77b20873f9..70501965fe2f5b95d7b7e6708c11bf570bba1220 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py @@ -28,7 +28,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py index 4373aa56694d5ac4b6d5d529b6eb5d3e3edf358c..5e551a373c523bc3d701ccd36c96dd89adea19a0 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py @@ -28,7 +28,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py index 45009a716a5da3389f0f37713d73372a06ce4b21..f2d4c4f814eae1a0a5abaabcc612d68bbe804310 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py index d1c4313c40375a8589ca05216856bb275d56c8b8..5971902cb6d903bf0807d3e8349b813ecde7fe74 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py index 941de25683ccb52e66992e8c6b15f337b53b19c5..f2dca234889512776bd8c24a73d7fde778a54e28 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py index e5392d38feaecee8d3e7d420b37717c6a03050bc..6f2781d645aec283eea8a6d2d0fdf99fe9dc5d0d 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py index dd8dd5d76db4afd24b9948bf5ff3a708a33e319b..b226204654a9d59e36a05d459865c62b2dd5ade2 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py index eacd1bb7ddcc9429959dea76f4bcb465b3041d1c..766110d74ec8c73972ff6cdfef6beea8026780f9 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py index ea362ad2b4179e114a5f0605bebd78b78a14706e..242681b0fc8d1b31d120b9bade58d7f2f2f4e491 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py index a3ffc13d625e3390cbb4797883b62c84078d6026..d512cba97c5b8f1c80f9a0d9153a94f15f1829c4 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py @@ -27,7 +27,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVarl=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" diff --git a/tests/develop-test/test.py b/tests/develop-test/test.py index 5dc6139410bf7d53da8e8fd36e047bb81a7e5eae..b25bda4a3b1b8c9a19b9e6687ca95bb0eb70d9b9 100644 --- a/tests/develop-test/test.py +++ b/tests/develop-test/test.py @@ -72,8 +72,9 @@ if __name__ == "__main__": queryPolicy = 1 createDnodeNums = 1 restful = False - opts, args = getopt.gnu_getopt(sys.argv[1:], 'f:p:m:l:scghrd:k:e:N:M:Q:C:RD:', [ - 'file=', 'path=', 'master', 'logSql', 'stop', 'cluster', 'valgrind', 'help', 'restart', 'updateCfgDict', 'killv', 'execCmd','dnodeNums','mnodeNums','queryPolicy','createDnodeNums','restful','adaptercfgupdate']) + replicaVar = 1 + opts, args = getopt.gnu_getopt(sys.argv[1:], 'f:p:m:l:scghrd:k:e:N:M:Q:C:RD:n:', [ + 'file=', 'path=', 'master', 'logSql', 'stop', 'cluster', 'valgrind', 'help', 'restart', 'updateCfgDict', 'killv', 'execCmd','dnodeNums','mnodeNums','queryPolicy','createDnodeNums','restful','adaptercfgupdate','replicaVar']) for key, value in opts: if key in ['-h', '--help']: tdLog.printNoPrefix( @@ -95,8 +96,7 @@ if __name__ == "__main__": tdLog.printNoPrefix('-C create Dnode Numbers in one cluster') tdLog.printNoPrefix('-R restful realization form') tdLog.printNoPrefix('-D taosadapter update cfg dict ') - - + tdLog.printNoPrefix('-n the number of replicas') sys.exit(0) if key in ['-r', '--restart']: @@ -168,6 +168,9 @@ if __name__ == "__main__": print('adapter cfg update convert fail.') sys.exit(0) + if key in ['-n', '--replicaVar']: + replicaVar = value + if not execCmd == "": if restful: tAdapter.init(deployPath) @@ -194,7 +197,7 @@ if __name__ == "__main__": processID = subprocess.check_output(psCmd, shell=True) for port in range(6030, 6041): - usePortPID = "lsof -i tcp:%d | grep LISTEn | awk '{print $2}'" % port + usePortPID = "lsof -i tcp:%d | grep LISTEN | awk '{print $2}'" % port processID = subprocess.check_output(usePortPID, shell=True) if processID: @@ -206,11 +209,13 @@ if __name__ == "__main__": time.sleep(2) if restful: - toBeKilled = "taosadapter" + toBeKilled = "taosadapt" - killCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}' | xargs kill -TERM > /dev/null 2>&1" % toBeKilled + # killCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}' | xargs kill -TERM > /dev/null 2>&1" % toBeKilled + killCmd = f"pkill {toBeKilled}" psCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}'" % toBeKilled + # psCmd = f"pgrep {toBeKilled}" processID = subprocess.check_output(psCmd, shell=True) while(processID): @@ -218,15 +223,15 @@ if __name__ == "__main__": time.sleep(1) processID = subprocess.check_output(psCmd, shell=True) - for port in range(6030, 6041): - usePortPID = "lsof -i tcp:%d | grep LISTEn | awk '{print $2}'" % port - processID = subprocess.check_output(usePortPID, shell=True) + port = 6041 + usePortPID = f"lsof -i tcp:{port} | grep LISTEN | awk '{{print $2}}'" + processID = subprocess.check_output(usePortPID, shell=True) - if processID: - killCmd = "kill -TERM %s" % processID - os.system(killCmd) - fuserCmd = "fuser -k -n tcp %d" % port - os.system(fuserCmd) + if processID: + killCmd = f"kill -TERM {processID}" + os.system(killCmd) + fuserCmd = f"fuser -k -n tcp {port}" + os.system(fuserCmd) tdLog.info('stop taosadapter') @@ -319,7 +324,7 @@ if __name__ == "__main__": for dnode in tdDnodes.dnodes: tdDnodes.starttaosd(dnode.index) tdCases.logSql(logSql) - + if restful: tAdapter.deploy(adapter_cfg_dict) tAdapter.start() @@ -339,6 +344,26 @@ if __name__ == "__main__": print("check dnode ready") except Exception as r: print(r) + if queryPolicy != 1: + queryPolicy=int(queryPolicy) + if restful: + conn = taosrest.connect(url=f"http://{host}:6041") + else: + conn = taos.connect(host,config=tdDnodes.getSimCfgPath()) + + cursor = conn.cursor() + cursor.execute("create qnode on dnode 1") + cursor.execute(f'alter local "queryPolicy" "{queryPolicy}"') + cursor.execute("show local variables") + res = cursor.fetchall() + for i in range(cursor.rowcount): + if res[i][0] == "queryPolicy" : + if int(res[i][1]) == int(queryPolicy): + tdLog.success(f'alter queryPolicy to {queryPolicy} successfully') + else: + tdLog.debug(res) + tdLog.exit(f"alter queryPolicy to {queryPolicy} failed") + if ucase is not None and hasattr(ucase, 'noConn') and ucase.noConn == True: conn = None else: @@ -453,6 +478,26 @@ if __name__ == "__main__": except Exception as r: print(r) + if queryPolicy != 1: + queryPolicy=int(queryPolicy) + if restful: + conn = taosrest.connect(url=f"http://{host}:6041") + else: + conn = taos.connect(host,config=tdDnodes.getSimCfgPath()) + + cursor = conn.cursor() + cursor.execute("create qnode on dnode 1") + cursor.execute(f'alter local "queryPolicy" "{queryPolicy}"') + cursor.execute("show local variables") + res = cursor.fetchall() + for i in range(cursor.rowcount): + if res[i][0] == "queryPolicy" : + if int(res[i][1]) == int(queryPolicy): + tdLog.success(f'alter queryPolicy to {queryPolicy} successfully') + else: + tdLog.debug(res) + tdLog.exit(f"alter queryPolicy to {queryPolicy} failed") + if testCluster: tdLog.info("Procedures for testing cluster") @@ -470,7 +515,7 @@ if __name__ == "__main__": if fileName == "all": tdCases.runAllLinux(conn) else: - tdCases.runOneLinux(conn, fileName) + tdCases.runOneLinux(conn, fileName, replicaVar) if restart: if fileName == "all": @@ -487,7 +532,7 @@ if __name__ == "__main__": conn = taosrest.connect(url=f"http://{host}:6041") tdLog.info("Procedures for tdengine deployed in %s" % (host)) tdLog.info("query test after taosd restart") - tdCases.runOneLinux(conn, sp[0] + "_" + "restart.py") + tdCases.runOneLinux(conn, sp[0] + "_" + "restart.py", replicaVar) else: tdLog.info("not need to query") diff --git a/tests/pytest/util/cases.py b/tests/pytest/util/cases.py index 2bfd8efdcd96979d25b58d7af50bb706d91fd91d..3eb5cf25484b377e7941f22f5605efdc6234198d 100644 --- a/tests/pytest/util/cases.py +++ b/tests/pytest/util/cases.py @@ -63,14 +63,14 @@ class TDCases: tdLog.info("total %d Linux test case(s) executed" % (runNum)) - def runOneLinux(self, conn, fileName): + def runOneLinux(self, conn, fileName, replicaVar): testModule = self.__dynamicLoadModule(fileName) runNum = 0 for tmp in self.linuxCases: if tmp.name.find(fileName) != -1: case = testModule.TDTestCase() - case.init(conn, self._logSql) + case.init(conn, self._logSql, replicaVar) try: case.run() except Exception as e: diff --git a/tests/system-test/0-others/cachemodel.py b/tests/system-test/0-others/cachemodel.py index 42c52a2f3c241eea3460fda7fa0b7f7102acb451..53834f792d8d470857f7c7704381e2db1177ac41 100644 --- a/tests/system-test/0-others/cachemodel.py +++ b/tests/system-test/0-others/cachemodel.py @@ -14,7 +14,7 @@ class TDTestCase: updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), True) diff --git a/tests/system-test/0-others/compatibility.py b/tests/system-test/0-others/compatibility.py index e81579a9e4ca3f2f72b9aff3892f1ed2878855a1..88fbcd179d7ccb2aadc8dcb5e570d6adf9a9e668 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -22,7 +22,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/0-others/fsync.py b/tests/system-test/0-others/fsync.py index 6eefc3db24be8f47bce1b362d8b97f5550cbb461..fe470c442e40957818efdab8fa0bd0610611341c 100644 --- a/tests/system-test/0-others/fsync.py +++ b/tests/system-test/0-others/fsync.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/0-others/show.py b/tests/system-test/0-others/show.py index c25d1d1f33ba98c2fb7bb6924f7a24c55b81e744..6ce8872cdadb037e83b1df750bff0b153123dcde 100644 --- a/tests/system-test/0-others/show.py +++ b/tests/system-test/0-others/show.py @@ -20,7 +20,7 @@ from util.sqlset import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.setsql = TDSetSql() diff --git a/tests/system-test/0-others/sysinfo.py b/tests/system-test/0-others/sysinfo.py index a4716dd5444efa6d6644b03c0e5e2ab10aa1a0b1..b9ea39fc8480e59032ed66bc0c60bd4b79332fa2 100644 --- a/tests/system-test/0-others/sysinfo.py +++ b/tests/system-test/0-others/sysinfo.py @@ -20,7 +20,7 @@ from util.common import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.dbname = 'db' diff --git a/tests/system-test/0-others/taosShell.py b/tests/system-test/0-others/taosShell.py index 879d78e7ac12271e5d5fc859d9782f11962e08d5..accb49dbfbf6ca60e173f7e56553c102c0bc3528 100644 --- a/tests/system-test/0-others/taosShell.py +++ b/tests/system-test/0-others/taosShell.py @@ -108,7 +108,7 @@ class TDTestCase: print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/0-others/taosShellError.py b/tests/system-test/0-others/taosShellError.py index 0dca5ff40f6cea3ccdd65783dd5d8f2246eb258f..e8271387a81dd0b7eea785e911dd4b40d7e3bbe0 100644 --- a/tests/system-test/0-others/taosShellError.py +++ b/tests/system-test/0-others/taosShellError.py @@ -110,7 +110,7 @@ class TDTestCase: print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/0-others/taosShellNetChk.py b/tests/system-test/0-others/taosShellNetChk.py index 80f6a6bc3007bdb2f5a2dfaca2b0fe71d9ea2042..72c06f71bee90868395193f1bb2ef15c55910136 100644 --- a/tests/system-test/0-others/taosShellNetChk.py +++ b/tests/system-test/0-others/taosShellNetChk.py @@ -110,7 +110,7 @@ class TDTestCase: print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/0-others/taosdMonitor.py b/tests/system-test/0-others/taosdMonitor.py index 96e057c9f815b19a20ef98b87d58c3ec7fdfe51d..a9907419e420e25c7819aa422bffc5db14e7fb1d 100644 --- a/tests/system-test/0-others/taosdMonitor.py +++ b/tests/system-test/0-others/taosdMonitor.py @@ -284,7 +284,7 @@ class TDTestCase: print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/0-others/taosdShell.py b/tests/system-test/0-others/taosdShell.py index c992834918701b5a3448868c147d99bb54f83685..83b4956c9be129d3f47ac0b42aa90f7a65ca829a 100644 --- a/tests/system-test/0-others/taosdShell.py +++ b/tests/system-test/0-others/taosdShell.py @@ -44,7 +44,7 @@ class TDTestCase: # print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/0-others/taosdlog.py b/tests/system-test/0-others/taosdlog.py index bd3d6b9b4c0a97f72bac88e6626d00b4591b6abe..ba265abc2d1cbc501920fefaa953023b65aaf760 100644 --- a/tests/system-test/0-others/taosdlog.py +++ b/tests/system-test/0-others/taosdlog.py @@ -10,7 +10,7 @@ from util.dnodes import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/0-others/telemetry.py b/tests/system-test/0-others/telemetry.py index 812b8b40c54a30fc478c18eb220639d9ef8117a3..021b9aed2c0dbbaa4126738d1adcf5f13622011a 100644 --- a/tests/system-test/0-others/telemetry.py +++ b/tests/system-test/0-others/telemetry.py @@ -173,7 +173,7 @@ class TDTestCase: print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/0-others/udfTest.py b/tests/system-test/0-others/udfTest.py index c4c40348b8b5bd5e75b62ba1c914f2e7f0e29c8b..a58e22ba1cbc2b37c14307d4bafc3f1d6e12df27 100644 --- a/tests/system-test/0-others/udfTest.py +++ b/tests/system-test/0-others/udfTest.py @@ -13,7 +13,7 @@ import subprocess class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/0-others/udf_cfg1.py b/tests/system-test/0-others/udf_cfg1.py index e6ab57b4882e5d66de0560d29908b54bb93e5357..9b1874d576bb34046be5230b640c89bd710e4154 100644 --- a/tests/system-test/0-others/udf_cfg1.py +++ b/tests/system-test/0-others/udf_cfg1.py @@ -15,7 +15,7 @@ class TDTestCase: updatecfgDict = {'debugFlag': 143, "cDebugFlag": 143, "uDebugFlag": 143, "rpcDebugFlag": 143, "tmrDebugFlag": 143, "jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143, "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "fnDebugFlag": 143 ,"udf":0} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/0-others/udf_cfg2.py b/tests/system-test/0-others/udf_cfg2.py index 3f8ba37491edd4c15e41c7903d2fb942009b36c2..67848a94305f93788c4fe43516f3ac241cb28159 100644 --- a/tests/system-test/0-others/udf_cfg2.py +++ b/tests/system-test/0-others/udf_cfg2.py @@ -15,7 +15,7 @@ class TDTestCase: updatecfgDict = {'debugFlag': 143, "cDebugFlag": 143, "uDebugFlag": 143, "rpcDebugFlag": 143, "tmrDebugFlag": 143, "jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143, "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "fnDebugFlag": 143 ,"udf":1} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/0-others/udf_cluster.py b/tests/system-test/0-others/udf_cluster.py index 1ca17383326b8f5ccf2b3fc628d0f69aa0003ab3..a20bc128a23796647f97b800d03130fc600a22e8 100644 --- a/tests/system-test/0-others/udf_cluster.py +++ b/tests/system-test/0-others/udf_cluster.py @@ -19,7 +19,7 @@ class MyDnodes(TDDnodes): class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None self.depoly_cluster(3) diff --git a/tests/system-test/0-others/udf_create.py b/tests/system-test/0-others/udf_create.py index 788202eb1b9d39447dec1076dbb3091f2440dd33..736943cc5614270da645ab4438b92ae69cb34eae 100644 --- a/tests/system-test/0-others/udf_create.py +++ b/tests/system-test/0-others/udf_create.py @@ -15,7 +15,7 @@ import threading class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/0-others/udf_restart_taosd.py b/tests/system-test/0-others/udf_restart_taosd.py index b860a0dfabeb562c1e2e83a02c613aaa1cb29f17..02c59c21e194ccf138b23f31a0d1fbe3b29c07f2 100644 --- a/tests/system-test/0-others/udf_restart_taosd.py +++ b/tests/system-test/0-others/udf_restart_taosd.py @@ -12,7 +12,7 @@ import subprocess class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/0-others/user_control.py b/tests/system-test/0-others/user_control.py index a20b7b17bccf9a04d52e46d56af2a2d0b0e489fb..c6a1a7eac2ecce339d47ee5f8983983a4545b9f1 100644 --- a/tests/system-test/0-others/user_control.py +++ b/tests/system-test/0-others/user_control.py @@ -154,7 +154,7 @@ class User: class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/1-insert/alter_database.py b/tests/system-test/1-insert/alter_database.py index d3a55ee0a6d97c23097c442321a079836c78d49f..6d9e04ec42afddd90d4988f0f8d007c2042bc66f 100644 --- a/tests/system-test/1-insert/alter_database.py +++ b/tests/system-test/1-insert/alter_database.py @@ -11,7 +11,7 @@ from util.cases import * from util.dnodes import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(),logSql) self.buffer_boundary = [3,4097,8193,12289,16384] diff --git a/tests/system-test/1-insert/alter_stable.py b/tests/system-test/1-insert/alter_stable.py index b66cbb89c0796416d033294a1c9ae9d92afb1dc1..77ff6ae0f8b995fb17ea9703cdbe2b59242afd18 100644 --- a/tests/system-test/1-insert/alter_stable.py +++ b/tests/system-test/1-insert/alter_stable.py @@ -20,7 +20,7 @@ from util.sqlset import * from util import constant from util.common import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.setsql = TDSetSql() diff --git a/tests/system-test/1-insert/alter_table.py b/tests/system-test/1-insert/alter_table.py index 5fbfff9909d91c1213858618cbdf8f8fd20e9bd4..aed4089cfac351090559c1cf71173248f0ae39c2 100644 --- a/tests/system-test/1-insert/alter_table.py +++ b/tests/system-test/1-insert/alter_table.py @@ -21,7 +21,7 @@ from util.common import * from util.sqlset import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.setsql = TDSetSql() diff --git a/tests/system-test/1-insert/block_wise.py b/tests/system-test/1-insert/block_wise.py index b5ee2706ddea4647eb789cc994ccee1f20112704..bb35154746a2d6eb5933669448065820deaafb03 100644 --- a/tests/system-test/1-insert/block_wise.py +++ b/tests/system-test/1-insert/block_wise.py @@ -142,7 +142,7 @@ class BSMAschema: class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) self.precision = "ms" diff --git a/tests/system-test/1-insert/create_retentions.py b/tests/system-test/1-insert/create_retentions.py index 47d53d5b341964b46ef0dbeb375378d1e1a16df2..d16e506b5379b416475dff7992f9834071fe4dfb 100644 --- a/tests/system-test/1-insert/create_retentions.py +++ b/tests/system-test/1-insert/create_retentions.py @@ -44,7 +44,7 @@ NTBNAME = "nt1" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), True) diff --git a/tests/system-test/1-insert/database_pre_suf.py b/tests/system-test/1-insert/database_pre_suf.py index 770819a3177dfbb06acdf61e9ad1b476ad1e4fcb..c921619e560894165a9deac068f417a8f0d3f2eb 100755 --- a/tests/system-test/1-insert/database_pre_suf.py +++ b/tests/system-test/1-insert/database_pre_suf.py @@ -28,7 +28,7 @@ class TDTestCase: "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"fnDebugFlag":143} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/1-insert/db_tb_name_check.py b/tests/system-test/1-insert/db_tb_name_check.py index 5017fde68a8bbf249ce599ba9b5ef882433ed73d..fd0bd43b01e183d174bf91e998276a33a0e3f81c 100644 --- a/tests/system-test/1-insert/db_tb_name_check.py +++ b/tests/system-test/1-insert/db_tb_name_check.py @@ -31,7 +31,7 @@ from util.common import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.special_name = ['!','@','#','$','%','^','&','*','(',')','[',']','{','}',\ diff --git a/tests/system-test/1-insert/delete_data.py b/tests/system-test/1-insert/delete_data.py index f620a4b18a0d7ddf5a0d65c902d0411c270e6463..d935a08133dd3f76f0b5f2ecdead19e95a12b2e2 100644 --- a/tests/system-test/1-insert/delete_data.py +++ b/tests/system-test/1-insert/delete_data.py @@ -23,7 +23,7 @@ from util.common import * from util.sqlset import TDSetSql class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.dbname = 'db_test' diff --git a/tests/system-test/1-insert/influxdb_line_taosc_insert.py b/tests/system-test/1-insert/influxdb_line_taosc_insert.py index cae4294bc90c16ad3fed032eff610f5b943d789e..82db318c2bf074c987830dd9e970ab28318714e5 100644 --- a/tests/system-test/1-insert/influxdb_line_taosc_insert.py +++ b/tests/system-test/1-insert/influxdb_line_taosc_insert.py @@ -29,7 +29,7 @@ if platform.system().lower() == 'windows': sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8') class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), False) self._conn = conn diff --git a/tests/system-test/1-insert/insertWithMoreVgroup.py b/tests/system-test/1-insert/insertWithMoreVgroup.py index b80a5f9a4ac855f8e8bd70e53b0bcdcd28420f94..9d033ff6e5bb2320bf81200c0563efc241f4161b 100644 --- a/tests/system-test/1-insert/insertWithMoreVgroup.py +++ b/tests/system-test/1-insert/insertWithMoreVgroup.py @@ -62,7 +62,7 @@ class TDTestCase: return buildPath # init - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) # tdSql.prepare() diff --git a/tests/system-test/1-insert/insert_drop.py b/tests/system-test/1-insert/insert_drop.py index 3e30e94a6b4b6845c826fb75bed43126d20387d8..d06350148450fc687abc1643c43940bbdef5a851 100644 --- a/tests/system-test/1-insert/insert_drop.py +++ b/tests/system-test/1-insert/insert_drop.py @@ -8,7 +8,7 @@ import threading class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/1-insert/keep_expired.py b/tests/system-test/1-insert/keep_expired.py index d02c9fbd5c37cca5dec6fd4e8c0f188fd13eed56..00cbc771c58efb5c82ea27893dcfb4324bc1f350 100644 --- a/tests/system-test/1-insert/keep_expired.py +++ b/tests/system-test/1-insert/keep_expired.py @@ -7,7 +7,7 @@ import time class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.dbname = "test" diff --git a/tests/system-test/1-insert/mutil_stage.py b/tests/system-test/1-insert/mutil_stage.py index 63317e8036b6455984231bf634b23f7238935642..08f0ba83131cd53f27be5456e683235757cecff5 100644 --- a/tests/system-test/1-insert/mutil_stage.py +++ b/tests/system-test/1-insert/mutil_stage.py @@ -57,7 +57,7 @@ DATA_PRE2 = f"data2" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) self.taos_cfg_path = tdDnodes.dnodes[0].cfgPath diff --git a/tests/system-test/1-insert/mutipythonnodebugtaosd.py b/tests/system-test/1-insert/mutipythonnodebugtaosd.py index 8aea53cd921c2199c91387fdd907f2e8f5bb026b..1f568fdea16be3f976bfc977b1fd48e024448966 100644 --- a/tests/system-test/1-insert/mutipythonnodebugtaosd.py +++ b/tests/system-test/1-insert/mutipythonnodebugtaosd.py @@ -60,7 +60,7 @@ class TDTestCase: return buildPath # init - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) # tdSql.init(conn.cursor()) # tdSql.prepare() diff --git a/tests/system-test/1-insert/opentsdb_json_taosc_insert.py b/tests/system-test/1-insert/opentsdb_json_taosc_insert.py index 3b01784000b74c1f6bb072f24e8be36e99d37f4f..9be51eb445061fa8299c4fb51b2d2a632e841d85 100644 --- a/tests/system-test/1-insert/opentsdb_json_taosc_insert.py +++ b/tests/system-test/1-insert/opentsdb_json_taosc_insert.py @@ -24,7 +24,7 @@ import threading import json class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self._conn = conn diff --git a/tests/system-test/1-insert/opentsdb_telnet_line_taosc_insert.py b/tests/system-test/1-insert/opentsdb_telnet_line_taosc_insert.py index 209cfb724e460207493dc2ca1ab0dd3522eb333b..ab11691cf82e1eef6460bb38818a6fcde1eef128 100644 --- a/tests/system-test/1-insert/opentsdb_telnet_line_taosc_insert.py +++ b/tests/system-test/1-insert/opentsdb_telnet_line_taosc_insert.py @@ -28,7 +28,7 @@ if platform.system().lower() == 'windows': sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8') class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), False) self._conn = conn diff --git a/tests/system-test/1-insert/table_comment.py b/tests/system-test/1-insert/table_comment.py index a0ae364fcd85eae1fcf11480f920d2c1febf3b31..2a8aa9b26a05499d88e1aabaa48bbd3dc9402673 100644 --- a/tests/system-test/1-insert/table_comment.py +++ b/tests/system-test/1-insert/table_comment.py @@ -20,7 +20,7 @@ from util.sql import * from util.common import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) # prepare data diff --git a/tests/system-test/1-insert/table_param_ttl.py b/tests/system-test/1-insert/table_param_ttl.py index 21c591b07e3091a69d1cc211cc790785d807d92a..a184c51178b27bae968ecbd2606e8fd21a85bf17 100644 --- a/tests/system-test/1-insert/table_param_ttl.py +++ b/tests/system-test/1-insert/table_param_ttl.py @@ -18,7 +18,7 @@ from util.common import * class TDTestCase: updatecfgDict = {'ttlUnit':5,'ttlPushInterval':3} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.ntbname = 'ntb' diff --git a/tests/system-test/1-insert/tb_100w_data_order.py b/tests/system-test/1-insert/tb_100w_data_order.py index d489ba21bc540f6547c7e531277bac00da6f98c7..85fe559cc24b8eed75a4ec3c8bd87efec6f6ef55 100644 --- a/tests/system-test/1-insert/tb_100w_data_order.py +++ b/tests/system-test/1-insert/tb_100w_data_order.py @@ -5,7 +5,7 @@ from util.common import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.ts = 1537146000000 diff --git a/tests/system-test/1-insert/test_stmt_muti_insert_query.py b/tests/system-test/1-insert/test_stmt_muti_insert_query.py index 7ddc0e60bd3ba6a48a96f86171c1995f49451b92..89beb30dc9433e449a40b66626bb5d914460f2cc 100644 --- a/tests/system-test/1-insert/test_stmt_muti_insert_query.py +++ b/tests/system-test/1-insert/test_stmt_muti_insert_query.py @@ -57,7 +57,7 @@ class TDTestCase: return buildPath # init - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) # tdSql.prepare() diff --git a/tests/system-test/1-insert/test_stmt_set_tbname_tag.py b/tests/system-test/1-insert/test_stmt_set_tbname_tag.py index 321dc88cd7ecfe147a07b9c7ee358025a754bdf0..535a65ffed0785df370d6c8cfac80fa94ac85d0b 100644 --- a/tests/system-test/1-insert/test_stmt_set_tbname_tag.py +++ b/tests/system-test/1-insert/test_stmt_set_tbname_tag.py @@ -57,7 +57,7 @@ class TDTestCase: return buildPath # init - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) # tdSql.prepare() diff --git a/tests/system-test/1-insert/time_range_wise.py b/tests/system-test/1-insert/time_range_wise.py index 31885831814bc9ff840672315efbe67b729a92c1..1499c178d43d13b4053e50e1c8d42b5acebdf919 100644 --- a/tests/system-test/1-insert/time_range_wise.py +++ b/tests/system-test/1-insert/time_range_wise.py @@ -134,7 +134,7 @@ class SMAschema: class TDTestCase: updatecfgDict = {"querySmaOptimize": 1} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) self.precision = "ms" diff --git a/tests/system-test/1-insert/update_data.py b/tests/system-test/1-insert/update_data.py index 0d8576b00d4446696c89d40b6914d82082030096..d6b37db8b19fef80322ae4f12210c91f6cb431c7 100644 --- a/tests/system-test/1-insert/update_data.py +++ b/tests/system-test/1-insert/update_data.py @@ -20,7 +20,7 @@ from util.sql import * from util.common import * from util.sqlset import TDSetSql class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(),logSql) self.setsql = TDSetSql() diff --git a/tests/system-test/1-insert/update_data_muti_rows.py b/tests/system-test/1-insert/update_data_muti_rows.py index 623dc497ea127c904e8c8e3dede6e9d13dd76976..af78ba5d1942e063c08da90f13f835c814482bc4 100644 --- a/tests/system-test/1-insert/update_data_muti_rows.py +++ b/tests/system-test/1-insert/update_data_muti_rows.py @@ -23,7 +23,7 @@ from util.common import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.dbname = 'db_test' diff --git a/tests/system-test/2-query/Now.py b/tests/system-test/2-query/Now.py index 35291856f2389a1aad47cdae8ccd762bde9f8f0f..0e514cf43bbca4c713070fb1f16c274699d87886 100644 --- a/tests/system-test/2-query/Now.py +++ b/tests/system-test/2-query/Now.py @@ -7,7 +7,7 @@ from util.sqlset import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.setsql = TDSetSql() diff --git a/tests/system-test/2-query/Timediff.py b/tests/system-test/2-query/Timediff.py index 1f73215dd5b5aab6dec6569c2a72971494a54e6f..c126ce926a1b24c0456f3a817127d30a057027aa 100644 --- a/tests/system-test/2-query/Timediff.py +++ b/tests/system-test/2-query/Timediff.py @@ -4,7 +4,7 @@ from util.cases import * from util.gettime import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.get_time = GetTime() diff --git a/tests/system-test/2-query/To_iso8601.py b/tests/system-test/2-query/To_iso8601.py index ccc26e9b1b4efc14570d002711d8054b46a41fce..bf4fe404aa9c2cf54d22520bfa8eb308d728570b 100644 --- a/tests/system-test/2-query/To_iso8601.py +++ b/tests/system-test/2-query/To_iso8601.py @@ -10,7 +10,7 @@ import os class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.rowNum = 10 diff --git a/tests/system-test/2-query/To_unixtimestamp.py b/tests/system-test/2-query/To_unixtimestamp.py index 64f7b18e4102e39fe5171df902babab10cb78640..df99b088626bab2222c3426c242ec43cf5de0939 100644 --- a/tests/system-test/2-query/To_unixtimestamp.py +++ b/tests/system-test/2-query/To_unixtimestamp.py @@ -10,7 +10,7 @@ from util.sqlset import TDSetSql class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.setsql = TDSetSql() diff --git a/tests/system-test/2-query/Today.py b/tests/system-test/2-query/Today.py index 0124c5bbac937f46e78096cc3a55f873a80ad15b..0f89a378beeeef83809ed764f887c1526b2b4df1 100644 --- a/tests/system-test/2-query/Today.py +++ b/tests/system-test/2-query/Today.py @@ -10,7 +10,7 @@ import pandas as pd class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.today_date = datetime.datetime.strptime(datetime.datetime.now().strftime("%Y-%m-%d"), "%Y-%m-%d") diff --git a/tests/system-test/2-query/abs.py b/tests/system-test/2-query/abs.py index c9fc025b9799863a5460fa077d20db88d92a803e..6bc9457264a3faa711db0396c10238a905f5221c 100644 --- a/tests/system-test/2-query/abs.py +++ b/tests/system-test/2-query/abs.py @@ -14,7 +14,7 @@ class TDTestCase: # "jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143, # "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "udfDebugFlag": 143} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) self.tb_nums = 10 diff --git a/tests/system-test/2-query/and_or_for_byte.py b/tests/system-test/2-query/and_or_for_byte.py index 7d156da3790b1f5b005dd03543aafc8d197a9b82..682d729f0efa735522803c70e1db4e0aac3d7299 100644 --- a/tests/system-test/2-query/and_or_for_byte.py +++ b/tests/system-test/2-query/and_or_for_byte.py @@ -14,7 +14,7 @@ class TDTestCase: # "jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143, # "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "udfDebugFlag": 143} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) self.tb_nums = 10 diff --git a/tests/system-test/2-query/apercentile.py b/tests/system-test/2-query/apercentile.py index 128a03937a21ebf36e45d977eae367c9c4dc5793..8997238d7b6be2ef30819b370dd3c1e3b4563d86 100644 --- a/tests/system-test/2-query/apercentile.py +++ b/tests/system-test/2-query/apercentile.py @@ -18,7 +18,7 @@ import numpy as np from util.sqlset import TDSetSql class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(),False) self.rowNum = 10 diff --git a/tests/system-test/2-query/arccos.py b/tests/system-test/2-query/arccos.py index 1787521517ea8bb586908ee06b74aec8fed04191..69e42a391179c242949457962a734c8bf49e73b4 100644 --- a/tests/system-test/2-query/arccos.py +++ b/tests/system-test/2-query/arccos.py @@ -12,7 +12,7 @@ class TDTestCase: # updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , # "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} - def init(self, conn, powSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/arcsin.py b/tests/system-test/2-query/arcsin.py index 127419029b6851720ffb126c4741a9b4a8b62b95..57d08d0587bac7d8adf13415a2f4d52b5c1e4d27 100644 --- a/tests/system-test/2-query/arcsin.py +++ b/tests/system-test/2-query/arcsin.py @@ -12,7 +12,7 @@ class TDTestCase: # updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , # "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} - def init(self, conn, powSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/arctan.py b/tests/system-test/2-query/arctan.py index e6ae16b8d9a9e22f3ea9a38da314b91e02d7db6e..64a29f7ccb780a0bf99761eae327dd80dcbe1542 100644 --- a/tests/system-test/2-query/arctan.py +++ b/tests/system-test/2-query/arctan.py @@ -12,7 +12,7 @@ class TDTestCase: # updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , # "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} - def init(self, conn, powSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/avg.py b/tests/system-test/2-query/avg.py index 5ba0a91a7e68c2aad9b2d5c2deb8984a9ba79095..e7086744f87f80f433299fe48ff65f6e0142c29e 100644 --- a/tests/system-test/2-query/avg.py +++ b/tests/system-test/2-query/avg.py @@ -10,7 +10,7 @@ class TDTestCase: # updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , # "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) self.setsql = TDSetSql() diff --git a/tests/system-test/2-query/between.py b/tests/system-test/2-query/between.py index a9dde5617d589aaa97ae420217a31e6210e6d545..dd7dda668b9e26bc38be1eac7267f6e763a62329 100644 --- a/tests/system-test/2-query/between.py +++ b/tests/system-test/2-query/between.py @@ -9,7 +9,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/bottom.py b/tests/system-test/2-query/bottom.py index e75fde3ed44a11c3d1853177d437cf4b95dc108e..4c352b619f2f933805d7666a9653fb78870a7f0a 100644 --- a/tests/system-test/2-query/bottom.py +++ b/tests/system-test/2-query/bottom.py @@ -21,7 +21,7 @@ from util.sqlset import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.dbname = 'db_test' diff --git a/tests/system-test/2-query/cast.py b/tests/system-test/2-query/cast.py index caaa075fd49c9575a55582e5dcde37b078c6d7a5..b5881221f4b652dfd7faaf25597ad28354149566 100644 --- a/tests/system-test/2-query/cast.py +++ b/tests/system-test/2-query/cast.py @@ -12,7 +12,7 @@ from util.dnodes import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.dbname = "db" diff --git a/tests/system-test/2-query/ceil.py b/tests/system-test/2-query/ceil.py index 6777b449f9c5fb396c5f62673c2ef933e9bd4eaf..221b571e8e9976f349a8c2fa0f8831c24a5c60eb 100644 --- a/tests/system-test/2-query/ceil.py +++ b/tests/system-test/2-query/ceil.py @@ -13,7 +13,7 @@ class TDTestCase: # "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/char_length.py b/tests/system-test/2-query/char_length.py index c0883e665ec84d7c63108c274cecd3956bb8d4b2..e8546ca72ee18c7e3606c3738583b679f21d2778 100644 --- a/tests/system-test/2-query/char_length.py +++ b/tests/system-test/2-query/char_length.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [TS_COL] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/check_tsdb.py b/tests/system-test/2-query/check_tsdb.py index f504a55dcd74ccc078eab1545164d1ee8353a9d2..0cbbc601713c15720b21a3509dd3a315f45613f9 100644 --- a/tests/system-test/2-query/check_tsdb.py +++ b/tests/system-test/2-query/check_tsdb.py @@ -12,7 +12,7 @@ class TDTestCase: # updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , # "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/concat.py b/tests/system-test/2-query/concat.py index 23b964012ab24ae4eb4ed34b0fc679813a070e37..dc05a17185874a820a488b58b94977a2c61fd40f 100644 --- a/tests/system-test/2-query/concat.py +++ b/tests/system-test/2-query/concat.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/concat2.py b/tests/system-test/2-query/concat2.py index 544222007607e5dddb10f9347f86a603b6aebdd3..1316a3a228fc5be221962f17768a9fd128015602 100644 --- a/tests/system-test/2-query/concat2.py +++ b/tests/system-test/2-query/concat2.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/concat_ws.py b/tests/system-test/2-query/concat_ws.py index ad784d92ec28ffc8da74eaa5bffa15a78c46a019..8443d41818a77ee96b733e7bc1d28356b04ca1a5 100644 --- a/tests/system-test/2-query/concat_ws.py +++ b/tests/system-test/2-query/concat_ws.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/concat_ws2.py b/tests/system-test/2-query/concat_ws2.py index caaae6cecb655a69bddb64919eb5509a4b4faa9a..38b93660e1dd282ce6a9dac8cd6e9bc6fab03a6d 100644 --- a/tests/system-test/2-query/concat_ws2.py +++ b/tests/system-test/2-query/concat_ws2.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/cos.py b/tests/system-test/2-query/cos.py index ab6814727e597f03b1989770bbb3e29af4ab2669..2675c34266f253aa512b00adbec0fcf903fce61e 100644 --- a/tests/system-test/2-query/cos.py +++ b/tests/system-test/2-query/cos.py @@ -12,7 +12,7 @@ class TDTestCase: # updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , # "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} - def init(self, conn, powSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/count.py b/tests/system-test/2-query/count.py index 4d2a1cf07ce530f0cfd156981f8dcf1c5d5f135a..6362974d0b3028e0cd5d49ef55edceab65a3dc10 100644 --- a/tests/system-test/2-query/count.py +++ b/tests/system-test/2-query/count.py @@ -3,7 +3,7 @@ from util.sql import * from util.cases import * from util.sqlset import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(),False) self.setsql = TDSetSql() diff --git a/tests/system-test/2-query/count_partition.py b/tests/system-test/2-query/count_partition.py index 90a6d9225b76fcc500c886645e9f304299d4180c..4ab51c4efe2d74bf4310c4a0de1e1a6c388ee7bb 100644 --- a/tests/system-test/2-query/count_partition.py +++ b/tests/system-test/2-query/count_partition.py @@ -4,7 +4,7 @@ from util.sql import * from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/csum.py b/tests/system-test/2-query/csum.py index 83aaca8f12468671272c1c39e715ac6a66c24c49..fb828b85df17f3c0827a2d7c452b0682c7f3e170 100644 --- a/tests/system-test/2-query/csum.py +++ b/tests/system-test/2-query/csum.py @@ -26,7 +26,7 @@ from util.dnodes import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/2-query/db.py b/tests/system-test/2-query/db.py index f2d85ebf6599970f99c302f080cda0b3ef6f3320..aea16dd162c8e7ac93a81da94d15602e5d7d37c1 100644 --- a/tests/system-test/2-query/db.py +++ b/tests/system-test/2-query/db.py @@ -11,7 +11,7 @@ import random class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/diff.py b/tests/system-test/2-query/diff.py index 9334fcca5e4194f833280afca35eaaea845d1425..74dae9d0fd096f16f6a84e52d5b8bd80f87ddea6 100644 --- a/tests/system-test/2-query/diff.py +++ b/tests/system-test/2-query/diff.py @@ -6,7 +6,7 @@ import numpy as np class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/distinct.py b/tests/system-test/2-query/distinct.py index 7214caec969f89090f7cc1db28ae787a5de84b17..c7c6e1c9b0d067ad67edcb30bbb6602333f458dd 100644 --- a/tests/system-test/2-query/distinct.py +++ b/tests/system-test/2-query/distinct.py @@ -9,7 +9,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/distribute_agg_apercentile.py b/tests/system-test/2-query/distribute_agg_apercentile.py index 9b8ec2ece83522311080f6cf055e222755e1428d..d2364df65ac4b3e9ce346faf4dbd08cc727ec8a1 100644 --- a/tests/system-test/2-query/distribute_agg_apercentile.py +++ b/tests/system-test/2-query/distribute_agg_apercentile.py @@ -8,7 +8,7 @@ import random class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.vnode_disbutes = None diff --git a/tests/system-test/2-query/distribute_agg_avg.py b/tests/system-test/2-query/distribute_agg_avg.py index c54b89a2ba1909d4f9ed9dfc8367958544a17bd2..4b5d3d8c5ab3bc74c8905ead27b6ddb01f52c26d 100644 --- a/tests/system-test/2-query/distribute_agg_avg.py +++ b/tests/system-test/2-query/distribute_agg_avg.py @@ -9,7 +9,7 @@ import platform class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.vnode_disbutes = None diff --git a/tests/system-test/2-query/distribute_agg_count.py b/tests/system-test/2-query/distribute_agg_count.py index f61b6d7c2e25548063d45d477d7ef9f9135bcebc..e6cf718c05682d4c2d51d8a5ea3c8b79a99867c0 100644 --- a/tests/system-test/2-query/distribute_agg_count.py +++ b/tests/system-test/2-query/distribute_agg_count.py @@ -8,7 +8,7 @@ import random class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.vnode_disbutes = None diff --git a/tests/system-test/2-query/distribute_agg_max.py b/tests/system-test/2-query/distribute_agg_max.py index 51b0ad4f94838e517e340df0b27740e089bade12..92188bd7651df20579bc94c50c8ad10cdc9d4f01 100644 --- a/tests/system-test/2-query/distribute_agg_max.py +++ b/tests/system-test/2-query/distribute_agg_max.py @@ -9,7 +9,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.vnode_disbutes = None diff --git a/tests/system-test/2-query/distribute_agg_min.py b/tests/system-test/2-query/distribute_agg_min.py index 543142ddfa07bc3e42d24ffb41eb98d09a629f67..afc42755b34d3384e7dcb2e58c3e643a19fb3458 100644 --- a/tests/system-test/2-query/distribute_agg_min.py +++ b/tests/system-test/2-query/distribute_agg_min.py @@ -9,7 +9,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.vnode_disbutes = None diff --git a/tests/system-test/2-query/distribute_agg_spread.py b/tests/system-test/2-query/distribute_agg_spread.py index 222bd7315e3f4a640e65d4c1531ae4ada25328bc..ab073c76a2aadf9257cf47b30011e0a4a3ce61f1 100644 --- a/tests/system-test/2-query/distribute_agg_spread.py +++ b/tests/system-test/2-query/distribute_agg_spread.py @@ -8,7 +8,7 @@ import random class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to execute {__file__}") tdSql.init(conn.cursor()) self.vnode_disbutes = None diff --git a/tests/system-test/2-query/distribute_agg_stddev.py b/tests/system-test/2-query/distribute_agg_stddev.py index 6b77fc7368df1850d7ffc817a7fb1a1f4f40d1a8..ae9479dcdd21fd54be77090ecc6529d09aef92cc 100644 --- a/tests/system-test/2-query/distribute_agg_stddev.py +++ b/tests/system-test/2-query/distribute_agg_stddev.py @@ -9,7 +9,7 @@ import math class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.vnode_disbutes = None diff --git a/tests/system-test/2-query/distribute_agg_sum.py b/tests/system-test/2-query/distribute_agg_sum.py index 9be4602fd93d8d6878b368d9c37df00fbb2aac96..59804b7dc500156a2fb0dd57168dbae16c9cfa01 100644 --- a/tests/system-test/2-query/distribute_agg_sum.py +++ b/tests/system-test/2-query/distribute_agg_sum.py @@ -9,7 +9,7 @@ import platform class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.vnode_disbutes = None diff --git a/tests/system-test/2-query/elapsed.py b/tests/system-test/2-query/elapsed.py index 6a3c5743466a1431b80403001384fb37b8600a6b..d31df49a8e7b507fe5a1f183f782968711b39a0e 100644 --- a/tests/system-test/2-query/elapsed.py +++ b/tests/system-test/2-query/elapsed.py @@ -20,7 +20,7 @@ from util.sql import * from util.dnodes import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/2-query/explain.py b/tests/system-test/2-query/explain.py index 21e16fab43e34e0d1a8a778dd5590820477511b7..1126e23f062fba0df2c701b12cb459c51b3f5d08 100644 --- a/tests/system-test/2-query/explain.py +++ b/tests/system-test/2-query/explain.py @@ -30,7 +30,7 @@ ALL_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, BOOL_C DBNAME = "db" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/2-query/first.py b/tests/system-test/2-query/first.py index 1aa51f8bb7f512590f03b1edf79736e98e9ae2f8..9523527076b3dd73aded55465fef0591c03b5c6f 100644 --- a/tests/system-test/2-query/first.py +++ b/tests/system-test/2-query/first.py @@ -23,7 +23,7 @@ import numpy as np class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/floor.py b/tests/system-test/2-query/floor.py index 793a56c1e52bb9b3368dd297f6f429461bab9ff7..65974ff2e9fa1ef0a4ed1fb268aae442883bc48e 100644 --- a/tests/system-test/2-query/floor.py +++ b/tests/system-test/2-query/floor.py @@ -12,7 +12,7 @@ DBNAME = "db" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/function_diff.py b/tests/system-test/2-query/function_diff.py index 946453bb23137d6ebbb67f8d588a67e054f5c2f1..7f11b12e8987a02eba50ec1919a92a9b7606745c 100644 --- a/tests/system-test/2-query/function_diff.py +++ b/tests/system-test/2-query/function_diff.py @@ -26,7 +26,7 @@ from util.dnodes import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/function_null.py b/tests/system-test/2-query/function_null.py index 93b46d2da12136c6816740451b6e7cf708fa391d..3a74ca268ffd53e1d9d82a79b8cd7f5cfde64ed1 100644 --- a/tests/system-test/2-query/function_null.py +++ b/tests/system-test/2-query/function_null.py @@ -11,7 +11,7 @@ import random class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) self.tb_nums = 10 diff --git a/tests/system-test/2-query/function_stateduration.py b/tests/system-test/2-query/function_stateduration.py index fec09e786bc7fcc72559067f6e046398f8500cac..8f25595713bfe71c6a8145ee660cf6ae41bad74e 100644 --- a/tests/system-test/2-query/function_stateduration.py +++ b/tests/system-test/2-query/function_stateduration.py @@ -5,7 +5,7 @@ from util.cases import * DBNAME = "db" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/histogram.py b/tests/system-test/2-query/histogram.py index 7a6d5b40838344b67b407b79af8b3e1a226cc868..ecbb7fe927866d9aa60451f68ebc7ba470341ade 100644 --- a/tests/system-test/2-query/histogram.py +++ b/tests/system-test/2-query/histogram.py @@ -144,7 +144,7 @@ class Hsgschema: class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) @@ -306,7 +306,9 @@ class TDTestCase: err_sqls.append( Hsgschema( col=INT_COL, bin_type="USER_INPUT", user_input="[0,3,6,9,'a']", normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="USER_INPUT", user_input="['a']", normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin=['{"start": 1, "width": 3, "count": 10, "infinity": false}'], normalized=1 ) ) - err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='[{"start": 1, "width": 3, "count": 10, "infinity": false}]', normalized=1 ) ) + # err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": 1, "width": 2, "count": 10, "infinity": false}', normalized=1 , "123" ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": 1, "width": float("inf"), "count": 10, "infinity": false}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": float("inf"), "width": 10, "count": 10, "infinity": false}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"begin": 1, "width": 3, "count": 10, "infinity": false}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": 1, "length": 3, "count": 10, "infinity": false}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": 1, "width": 3, "num": 10, "infinity": false}', normalized=1 ) ) @@ -325,6 +327,11 @@ class TDTestCase: err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin=['{"start": 1, "factor": 4, "count": 4, "infinity": true}'], normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='[{"start": 1, "factor": 4, "count": 4, "infinity": true}]', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"begin": 1, "factor": 4, "count": 4, "infinity": true}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": -10, "count": 4, "infinity": true}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 0, "count": 4, "infinity": true}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 0, "count": 4, "infinity": true}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": -10, "width": NULL, "count": 4, "infinity": true}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "step": 4, "count": 4, "infinity": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 4, "num": 4, "infinity": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 4, "count": 4, "witgnull": true}', normalized=1 ) ) @@ -338,6 +345,13 @@ class TDTestCase: err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": -10, "count": 4, "infinity": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 0, "infinity": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": -10, "infinity": true}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10001, "infinity": true}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": "123", "infinity": true}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": float("inf"), "infinity": false}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": float("inf"), "count": 10, "infinity": false}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": float("inf"), "factor": 10, "count": 10, "infinity": false}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": float("-inf"), "factor": 10, "count": 10, "infinity": false}', normalized=1 ) ) + err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10, "infinity": "true"}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10, "infinity": null}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10, "infinity": false}', where_clause=f"count({INT_COL}) >= 0 ") ) @@ -452,6 +466,21 @@ class TDTestCase: tdSql.checkData(0, 0, '{"lower_bin":0, "upper_bin":3, "count":3}') tdSql.checkData(1, 0, '{"lower_bin":3, "upper_bin":6, "count":3}') tdSql.checkData(2, 0, '{"lower_bin":6, "upper_bin":9, "count":3}') + + #error sql + # tdSql.error(f"SELECT HISTOGRAM(c_int, 'linear_bin', '{"start": -200, "width": 100, "count": 20, "infinity": false}', 0 ,1 ) from {dbname}.nt1 where c_int < 10") + + # tdSql.error(f"SELECT HISTOGRAM(c_int, 'linear_bin', '{"start": -200, "width": 100, "count": -10, "infinity": false}', 0 ) from {dbname}.nt1 where c_int < 10") + + # tdSql.error(f"SELECT HISTOGRAM(c_int, 'linear_bin', '{"start": -200, "width": 100, "count": 1001, "infinity": false}', 0 ) from {dbname}.nt1 where c_int < 10") + + tdSql.error(f"SELECT HISTOGRAM(c_int, 'log_bin', '[0,3,6,9]', 0 ,1 ) from {dbname}.nt1 where c_int < 10") + + tdSql.error(f"SELECT HISTOGRAM(c_int, 'USER_INPUT', '[0,3,6,9]', 0 ,1 ) from {dbname}.nt1 where c_int < 10") + tdSql.error(f"SELECT HISTOGRAM(c_int, 'USER_INPUT', '[0,3,6,9]' ) from {dbname}.nt1 where c_int < 10") + tdSql.error(f"SELECT HISTOGRAM('123', 'USER_INPUT', '[0,3,6,9]', 0 ) from {dbname}.nt1 where c_int < 10") + tdSql.error(f"SELECT HISTOGRAM('123', 123 ,123 ,123 ) from {dbname}.nt1 where c_int < 10") + tdSql.error(f"SELECT HISTOGRAM(123, '123' ,'123' ,'123' ) from {dbname}.nt1 where c_int < 10") # if (4 != numOfParams) # tdSql.error("select HISTOGRAM(c_int, \"linear_bin\", \"{\"start\": -200, \"width\": 100, \"count\": 20, \"infinity\": false}\", 1 , InvalidNumber) from db.stb1 where c_int < 10") diff --git a/tests/system-test/2-query/hyperloglog.py b/tests/system-test/2-query/hyperloglog.py index 68f7ebdf2e45e42011dbea806707581ebefff56b..eff687cba71b7adaf415f46e27b5047c13913bbc 100644 --- a/tests/system-test/2-query/hyperloglog.py +++ b/tests/system-test/2-query/hyperloglog.py @@ -31,7 +31,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/interp.py b/tests/system-test/2-query/interp.py index b5ca5f3bd17437a1e47c12aa07b14e4eb572be30..780565c778242c5987fa9ee31b56b19d78295477 100644 --- a/tests/system-test/2-query/interp.py +++ b/tests/system-test/2-query/interp.py @@ -9,7 +9,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") #tdSql.init(conn.cursor()) tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/2-query/irate.py b/tests/system-test/2-query/irate.py index 408f4b374950be29c0f6df06593fb3b216ff409f..7b3ec10a8dcf0bbea5ca3ac381fd61ac63725f4a 100644 --- a/tests/system-test/2-query/irate.py +++ b/tests/system-test/2-query/irate.py @@ -11,7 +11,7 @@ import random ,math class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) self.tb_nums = 10 diff --git a/tests/system-test/2-query/join.py b/tests/system-test/2-query/join.py index 9d30e1946a16c487f22e43fe03461d559dc7c945..04b4fa89a20da3996c17973656f02cdede6dd554 100644 --- a/tests/system-test/2-query/join.py +++ b/tests/system-test/2-query/join.py @@ -63,7 +63,7 @@ class DataSet: class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/join2.py b/tests/system-test/2-query/join2.py index 5c8fe0f0f96e6c28aa1ef70240b3ef4d5b0598fa..79cc62e4bc72e5815c677d66bb4d82eb691fbec3 100644 --- a/tests/system-test/2-query/join2.py +++ b/tests/system-test/2-query/join2.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/json_tag.py b/tests/system-test/2-query/json_tag.py index d9715579aed4878c1cf17642824718d412a77511..c6f1e5076dad83a3ec7e6a55fc5de70fa51bfc35 100644 --- a/tests/system-test/2-query/json_tag.py +++ b/tests/system-test/2-query/json_tag.py @@ -13,7 +13,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/json_tag_large_tables.py b/tests/system-test/2-query/json_tag_large_tables.py index 9164c108f94ec9f538ba8d12ecc45be3b3b60e06..06170e0adf22fa8b075bc165b70fe41e97117669 100644 --- a/tests/system-test/2-query/json_tag_large_tables.py +++ b/tests/system-test/2-query/json_tag_large_tables.py @@ -30,7 +30,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): self.testcasePath = os.path.split(__file__)[0] self.testcaseFilename = os.path.split(__file__)[-1] # os.system("rm -rf %s/%s.sql" % (self.testcasePath,self.testcaseFilename)) diff --git a/tests/system-test/2-query/last.py b/tests/system-test/2-query/last.py index ac1b67918160d892cd0a07aa84fcd02db63cbd21..0561dc9695820906c660168d2420573e4f928e35 100644 --- a/tests/system-test/2-query/last.py +++ b/tests/system-test/2-query/last.py @@ -8,7 +8,7 @@ import numpy as np class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/last_row.py b/tests/system-test/2-query/last_row.py index 6286852641a20020d8b3c517618603c2b5c84c0a..333c1516b3eb91c74cf977a2383249ff9f735dca 100644 --- a/tests/system-test/2-query/last_row.py +++ b/tests/system-test/2-query/last_row.py @@ -11,7 +11,7 @@ import random class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), True) self.tb_nums = 10 diff --git a/tests/system-test/2-query/leastsquares.py b/tests/system-test/2-query/leastsquares.py index fe7188a54547d9c63ae962b3330c6316d5672bba..8870e416f848465fe224032fbe7f45050dae1c58 100644 --- a/tests/system-test/2-query/leastsquares.py +++ b/tests/system-test/2-query/leastsquares.py @@ -29,7 +29,7 @@ ALL_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, BOOL_C DBNAME = "db" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/length.py b/tests/system-test/2-query/length.py index 1761572245a8ca5a1c814e21c566ffb1634e419a..44c951dd4a6b8693d41b57a498c1f2e81da22787 100644 --- a/tests/system-test/2-query/length.py +++ b/tests/system-test/2-query/length.py @@ -23,7 +23,7 @@ DBNAME = "db" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/log.py b/tests/system-test/2-query/log.py index 7e44d8dfd632b987d1e2bf152812d5d05deb41d3..11a0a9c3177f7e731cc325f269f0e483cd000a6f 100644 --- a/tests/system-test/2-query/log.py +++ b/tests/system-test/2-query/log.py @@ -11,7 +11,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/lower.py b/tests/system-test/2-query/lower.py index 0e33e3834ec9ecc50470f0793b29a3a4b84d4834..f8ac1ab217f0aed71db7826cbb89d0c94d13ed8a 100644 --- a/tests/system-test/2-query/lower.py +++ b/tests/system-test/2-query/lower.py @@ -22,7 +22,7 @@ TS_TYPE_COL = [TS_COL] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/ltrim.py b/tests/system-test/2-query/ltrim.py index 330f688990d614c1a824fd25741f19966e227581..ba769ba350422a7b90a58fd0cacd7134865a4781 100644 --- a/tests/system-test/2-query/ltrim.py +++ b/tests/system-test/2-query/ltrim.py @@ -27,7 +27,7 @@ DBNAME = "db" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/mavg.py b/tests/system-test/2-query/mavg.py index b52217af9ac61e5a3c08d55b11e4219ec826b203..7f545f2048900ea44154fc60736b8ec972f13a3e 100644 --- a/tests/system-test/2-query/mavg.py +++ b/tests/system-test/2-query/mavg.py @@ -27,7 +27,7 @@ from util.dnodes import * dbname = 'db' class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/max.py b/tests/system-test/2-query/max.py index f3f2fdb86baeffd5325a59314c33879cfb09998b..ee75afb501ebb30d902e43333557965e153d1a08 100644 --- a/tests/system-test/2-query/max.py +++ b/tests/system-test/2-query/max.py @@ -6,7 +6,7 @@ import numpy as np class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/max_partition.py b/tests/system-test/2-query/max_partition.py index 08bb7675add128f94f6ab5be0b9a7a8c90e49afe..f50b9fb2bb0f24dfe4fb19c9cf2047b122762fc9 100644 --- a/tests/system-test/2-query/max_partition.py +++ b/tests/system-test/2-query/max_partition.py @@ -4,7 +4,7 @@ from util.sql import * from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/min.py b/tests/system-test/2-query/min.py index d97c4340f4022af6372134892dba25c371af1b51..8849b14a338274dc52a900e602f943e2c4a292aa 100644 --- a/tests/system-test/2-query/min.py +++ b/tests/system-test/2-query/min.py @@ -6,7 +6,7 @@ import numpy as np class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/nestedQuery.py b/tests/system-test/2-query/nestedQuery.py index c6567a8e3be0ca5640baf158f53b6f65039045a0..4fbd840efeb2f3b08d5f6e7cc405679b661aa0a1 100755 --- a/tests/system-test/2-query/nestedQuery.py +++ b/tests/system-test/2-query/nestedQuery.py @@ -28,7 +28,7 @@ class TDTestCase: "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"fnDebugFlag":143} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/2-query/percentile.py b/tests/system-test/2-query/percentile.py index 3b027ed6a03e9e13f8782b91c36fdc5bb558c64d..58660eec6a98d50fe37ffcd5adff9d00c1be62ad 100644 --- a/tests/system-test/2-query/percentile.py +++ b/tests/system-test/2-query/percentile.py @@ -21,7 +21,7 @@ from util.sqlset import TDSetSql class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/pow.py b/tests/system-test/2-query/pow.py index 3a795ed25dbca84d162735ac40cf415eb973bdf7..f803da61767e2b961d4778e97cc09c744588484a 100644 --- a/tests/system-test/2-query/pow.py +++ b/tests/system-test/2-query/pow.py @@ -10,7 +10,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, powSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/qnodeCluster.py b/tests/system-test/2-query/qnodeCluster.py index 9e49bff9389deeb83839477c98e194c014a2a87f..6f3856146d20a8e1b9556a9cb3cf33da15bf80af 100644 --- a/tests/system-test/2-query/qnodeCluster.py +++ b/tests/system-test/2-query/qnodeCluster.py @@ -26,7 +26,7 @@ class TDTestCase: updatecfgDict = {'keepColumnName': 1} updatecfgDict["clientCfg"] = clientCfgDict - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/queryQnode.py b/tests/system-test/2-query/queryQnode.py index 7bd573d7fc454ed7856be148ed526d44e273f4a9..e3f4732c0892ee10d897cc38f4ce6392581ad3fc 100644 --- a/tests/system-test/2-query/queryQnode.py +++ b/tests/system-test/2-query/queryQnode.py @@ -64,7 +64,7 @@ class TDTestCase: return buildPath # init - def init(self, conn, logSql=True): + def init(self, conn, logSql=True, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) # tdSql.prepare() diff --git a/tests/system-test/2-query/query_cols_tags_and_or.py b/tests/system-test/2-query/query_cols_tags_and_or.py index af3fbb83c070202368f317b119377035ac133e16..9fc016cb40fbc7f3f44a1d1232d9ee85b722e327 100644 --- a/tests/system-test/2-query/query_cols_tags_and_or.py +++ b/tests/system-test/2-query/query_cols_tags_and_or.py @@ -16,7 +16,7 @@ from util.sql import tdSql from util.common import tdCom import random class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): ## add for TD-6672 tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/round.py b/tests/system-test/2-query/round.py index 1d69d3c9afa1d7fffc3b8eac80c2b648a54bc74e..8f969a71d7ad11b1fc7550eb7e68c9115244a8cb 100644 --- a/tests/system-test/2-query/round.py +++ b/tests/system-test/2-query/round.py @@ -9,7 +9,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/rtrim.py b/tests/system-test/2-query/rtrim.py index 80307e8534787889b080baa0c25a32b638c49461..e4835fbd8e0e29dc804cfe7c12d9c225db60ad26 100644 --- a/tests/system-test/2-query/rtrim.py +++ b/tests/system-test/2-query/rtrim.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/sample.py b/tests/system-test/2-query/sample.py index 7f1d7ab8c0d62fb4db7386caf3b4eeca4b3f8cba..d1890d86231bba56629bed07226d5fcb7c1c8040 100644 --- a/tests/system-test/2-query/sample.py +++ b/tests/system-test/2-query/sample.py @@ -24,7 +24,7 @@ DBNAME = "db" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.ts = 1537146000000 diff --git a/tests/system-test/2-query/sin.py b/tests/system-test/2-query/sin.py index a1ba3354879eb9e1e0abe66ae445f7604734ad66..46b1ac50ae7af76184e8855075c58993cfe79606 100644 --- a/tests/system-test/2-query/sin.py +++ b/tests/system-test/2-query/sin.py @@ -10,7 +10,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, powSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/smaTest.py b/tests/system-test/2-query/smaTest.py index 0217b6c28c2f44deb87c032957ef749fc329742e..20ed103f8ea1b4ed3b2af8ddc1983e88ebda4432 100644 --- a/tests/system-test/2-query/smaTest.py +++ b/tests/system-test/2-query/smaTest.py @@ -31,7 +31,7 @@ class TDTestCase: # updatecfgDict = {'fqdn': 135} # init - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) tdSql.prepare() @@ -78,7 +78,7 @@ class TDTestCase: def insert_data(self, tbname, ts_start, count): pre_insert = "insert into %s values"%tbname sql = pre_insert - tdLog.debug("doing insert table %s rows=%d ..."%(tbname, count)) + tdLog.debug("insert table %s rows=%d ..."%(tbname, count)) for i in range(count): sql += " (%d,%d)"%(ts_start + i*1000, i ) if i >0 and i%30000 == 0: @@ -94,7 +94,7 @@ class TDTestCase: def insert_data1(self, tbname, ts_start, count): pre_insert = "insert into %s values"%tbname sql = pre_insert - tdLog.debug("doing insert table %s rows=%d ..."%(tbname, count)) + tdLog.debug("insert table %s rows=%d ..."%(tbname, count)) for i in range(count): sql += " (%d,%d,%d)"%(ts_start + i*1000, i , i+1) if i >0 and i%30000 == 0: diff --git a/tests/system-test/2-query/sml.py b/tests/system-test/2-query/sml.py index 4dae2ad6c0ec289e034929e6a949eed8b665c899..64fe92438ca1b77a8b5d305237ba65c925494e0a 100644 --- a/tests/system-test/2-query/sml.py +++ b/tests/system-test/2-query/sml.py @@ -15,7 +15,7 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/2-query/spread.py b/tests/system-test/2-query/spread.py index ffe86ff36304224e2d5f776f5088a16b445a5231..79881d7293346a1ad70260f8c6d5f9165af052cd 100644 --- a/tests/system-test/2-query/spread.py +++ b/tests/system-test/2-query/spread.py @@ -30,7 +30,7 @@ DBNAME = "db" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/sqrt.py b/tests/system-test/2-query/sqrt.py index 9597375885cf5fdedf1d52a547d7558430cb46e4..4784b71fc67ed685508142c0058c7ac6478fc60f 100644 --- a/tests/system-test/2-query/sqrt.py +++ b/tests/system-test/2-query/sqrt.py @@ -10,7 +10,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, powSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/stablity.py b/tests/system-test/2-query/stablity.py index b4343359702e0af4e5a9e2b9f29cba1700f8be35..3c8d18e9e68771522935418097526ab9c3aa4bc0 100755 --- a/tests/system-test/2-query/stablity.py +++ b/tests/system-test/2-query/stablity.py @@ -28,7 +28,7 @@ class TDTestCase: "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"fnDebugFlag":143} - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/2-query/statecount.py b/tests/system-test/2-query/statecount.py index c73c955de405ee54e6924c25cd219aa8b8a7f4eb..1d9a04cc73b0296c94d33ac41b21b8e0d164ee16 100644 --- a/tests/system-test/2-query/statecount.py +++ b/tests/system-test/2-query/statecount.py @@ -12,7 +12,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.ts = 1420041600000 # 2015-01-01 00:00:00 this is begin time for first record diff --git a/tests/system-test/2-query/stateduration.py b/tests/system-test/2-query/stateduration.py index b6ddff4017ad61826801da9de3278be0f27d4af4..009ec37764d2ce05f9a4e306cacb67fa87cddadb 100644 --- a/tests/system-test/2-query/stateduration.py +++ b/tests/system-test/2-query/stateduration.py @@ -17,7 +17,7 @@ from util.sql import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.ts = 1537146000000 diff --git a/tests/system-test/2-query/stddev.py b/tests/system-test/2-query/stddev.py index 837353dfc9457bd332acdfa63066abc84a5d2a24..d044fb0dd79d8341c904a6ff80626ea5242bbb25 100644 --- a/tests/system-test/2-query/stddev.py +++ b/tests/system-test/2-query/stddev.py @@ -20,7 +20,7 @@ from util.sql import * from util.common import * from util.sqlset import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.dbname = 'db_test' diff --git a/tests/system-test/2-query/substr.py b/tests/system-test/2-query/substr.py index ea55c5e44e780c5acdd86b8be29e8654b8d1251e..9b317aeab6ddef9be62d2af84d5ea8c01561cd4a 100644 --- a/tests/system-test/2-query/substr.py +++ b/tests/system-test/2-query/substr.py @@ -29,7 +29,7 @@ LENS = 6 class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(),False) diff --git a/tests/system-test/2-query/sum.py b/tests/system-test/2-query/sum.py index dbc79e25f5ba230723f54507f47da91514698c69..ec1f60a720676c762187185338934c6a2e9bf095 100644 --- a/tests/system-test/2-query/sum.py +++ b/tests/system-test/2-query/sum.py @@ -24,7 +24,7 @@ DBNAME = "db" class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/tail.py b/tests/system-test/2-query/tail.py index 687023f57ec833248c2c7c472b751019a90f930f..3d5ecfaa9a57258a0e3dcabf27de48dfdd681545 100644 --- a/tests/system-test/2-query/tail.py +++ b/tests/system-test/2-query/tail.py @@ -11,7 +11,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/tan.py b/tests/system-test/2-query/tan.py index 683cee37ff7c81ca45b628852134ddbab6e342cf..203f1497124c595b784d9020aa6a52f4708f6998 100644 --- a/tests/system-test/2-query/tan.py +++ b/tests/system-test/2-query/tan.py @@ -10,7 +10,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, powSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/timetruncate.py b/tests/system-test/2-query/timetruncate.py index 4cc6b27d64fb97c969539f7d0d5b186b6de435c1..917b98daa984ec5cd0f17bc6a8d08db3a16924bc 100644 --- a/tests/system-test/2-query/timetruncate.py +++ b/tests/system-test/2-query/timetruncate.py @@ -7,7 +7,7 @@ import time from datetime import datetime from util.gettime import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) print(conn) diff --git a/tests/system-test/2-query/timezone.py b/tests/system-test/2-query/timezone.py index 9a4953909c20a3812629dc79b49724bdc659f895..0a2da114ded5e3f10f81b3ce2cb0248d2f07e575 100644 --- a/tests/system-test/2-query/timezone.py +++ b/tests/system-test/2-query/timezone.py @@ -11,7 +11,7 @@ if platform.system().lower() == 'windows': class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.setsql = TDSetSql() diff --git a/tests/system-test/2-query/top.py b/tests/system-test/2-query/top.py index 7fd143f6834511e810e3dfc2a8164e9dfbd8d8c4..1cba18c2e2ce257b402e1498984be93da9ef8c91 100644 --- a/tests/system-test/2-query/top.py +++ b/tests/system-test/2-query/top.py @@ -19,7 +19,7 @@ from util.sql import * from util.sqlset import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.setsql = TDSetSql() diff --git a/tests/system-test/2-query/tsbsQuery.py b/tests/system-test/2-query/tsbsQuery.py index 04a80a74ad2d6ec21a97dc17bba05fb02df3830b..c4604799a144a81f5fe9b3d99b5f3401e8e5b426 100644 --- a/tests/system-test/2-query/tsbsQuery.py +++ b/tests/system-test/2-query/tsbsQuery.py @@ -20,7 +20,7 @@ class TDTestCase: updatecfgDict = {'keepColumnName': 1} updatecfgDict["clientCfg"] = clientCfgDict - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/ttl_comment.py b/tests/system-test/2-query/ttl_comment.py index 187df2e2d33846a2e61a7519cdec8c13b352f9da..fabd641da765cfd6f813ec4ef8d23404a6e674e3 100644 --- a/tests/system-test/2-query/ttl_comment.py +++ b/tests/system-test/2-query/ttl_comment.py @@ -24,7 +24,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/twa.py b/tests/system-test/2-query/twa.py index a499c17efb631ea0dc6621b0afad309bc08e4388..1fd3b8fdda3b27369b34ecfb197d7f5cfbe1623f 100644 --- a/tests/system-test/2-query/twa.py +++ b/tests/system-test/2-query/twa.py @@ -9,7 +9,7 @@ import math class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.vnode_disbutes = None diff --git a/tests/system-test/2-query/union.py b/tests/system-test/2-query/union.py index 4040bb71cbb92849dd63d11627c93a2954a4a0d1..737817f262f55dc55576e30c58588c57bbf67c9b 100644 --- a/tests/system-test/2-query/union.py +++ b/tests/system-test/2-query/union.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/union1.py b/tests/system-test/2-query/union1.py index ea6940246e6fed6b9a2c8512f69fde4d3d3a6d70..1ca25e78448ca38e27b2c36475c4df123e40b62b 100644 --- a/tests/system-test/2-query/union1.py +++ b/tests/system-test/2-query/union1.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/union2.py b/tests/system-test/2-query/union2.py index 2d5e2f70bf01b277680c2fa14fe23a73ce61fd4b..c063b5c383d10d5c4afd9d2e45a0c3fd1ecd33c4 100644 --- a/tests/system-test/2-query/union2.py +++ b/tests/system-test/2-query/union2.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/union3.py b/tests/system-test/2-query/union3.py index 30a15e762470d90120f1cf997d390d2e659b6545..3322f30359cd637d3ba2ffb9e52d4a448dcd02e4 100644 --- a/tests/system-test/2-query/union3.py +++ b/tests/system-test/2-query/union3.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/union4.py b/tests/system-test/2-query/union4.py index 4b2fba4272b3c957d1f09a656e82d547bea2c376..2da83d819013131531ad1933cd8c0c7ac262a37f 100644 --- a/tests/system-test/2-query/union4.py +++ b/tests/system-test/2-query/union4.py @@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/unique.py b/tests/system-test/2-query/unique.py index 92eacd99ea33a999c3c42ffe8e505d32070192c6..b954fd004b85cdcad95a2d12ee334172aabb2c33 100644 --- a/tests/system-test/2-query/unique.py +++ b/tests/system-test/2-query/unique.py @@ -12,7 +12,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/upper.py b/tests/system-test/2-query/upper.py index f15a6f3ba76d3acb5645f443cf068d4cce7d9755..cc5347774cb556a490aca84cfb4a1d2e24cd278b 100644 --- a/tests/system-test/2-query/upper.py +++ b/tests/system-test/2-query/upper.py @@ -22,7 +22,7 @@ TS_TYPE_COL = [TS_COL] class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/varchar.py b/tests/system-test/2-query/varchar.py index 17c3ea633357cf16a8b17e52c180192d07e52a87..3d5f443b3c954ba2772de0995519d1340801d77f 100644 --- a/tests/system-test/2-query/varchar.py +++ b/tests/system-test/2-query/varchar.py @@ -9,7 +9,7 @@ from util.cases import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/5-taos-tools/TD-12478.py b/tests/system-test/5-taos-tools/TD-12478.py index 69849d3c7a7962955619a2674367402b5352376e..576e59f339bd37da24f624e90aa7f139dd5b9f3f 100644 --- a/tests/system-test/5-taos-tools/TD-12478.py +++ b/tests/system-test/5-taos-tools/TD-12478.py @@ -36,7 +36,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py b/tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py index 8c62f713b894308128c589b6ff569921d6db9589..8cb58b8d7091836bf65b5457c07b5e218bba682f 100644 --- a/tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py +++ b/tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py @@ -28,7 +28,7 @@ class TDTestCase: ''' return - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/6-cluster/5dnode1mnode.py b/tests/system-test/6-cluster/5dnode1mnode.py index 367d0bfbd779aac64812376e7b9b4c21a812fcaa..f2c0bf9902bc7a3c82633da436776f282d04fb98 100644 --- a/tests/system-test/6-cluster/5dnode1mnode.py +++ b/tests/system-test/6-cluster/5dnode1mnode.py @@ -21,7 +21,7 @@ class MyDnodes(TDDnodes): class TDTestCase: noConn = True - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None self.depoly_cluster(5) diff --git a/tests/system-test/6-cluster/5dnode2mnode.py b/tests/system-test/6-cluster/5dnode2mnode.py index 7cbadde8bf96cd6857367fbb6854ce8e901c38ac..6054ef69f8738d52cd5547ed00a74537e0ddcbc1 100644 --- a/tests/system-test/6-cluster/5dnode2mnode.py +++ b/tests/system-test/6-cluster/5dnode2mnode.py @@ -20,7 +20,7 @@ from clusterCommonCreate import * from clusterCommonCheck import * class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py b/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py index 909decc19562632bf1710190f250c4a867c41a92..e591114ef4544f54020058f6c57f8ae485643a9f 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py +++ b/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py @@ -26,7 +26,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeDrop.py b/tests/system-test/6-cluster/5dnode3mnodeDrop.py index 33dc3ebaac203dfa216a13e832560ac0918b9cb3..52f734b534527ec2a9d596866a8831ec84aa0dcc 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeDrop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeDrop.py @@ -22,7 +22,7 @@ class MyDnodes(TDDnodes): class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None diff --git a/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py b/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py index 74a7c32206f4f492465ce107cba5fec6e7a2d360..2b013704f293020bbf4c49b57c4d1f6b929aafc9 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py @@ -26,7 +26,7 @@ class MyDnodes(TDDnodes): class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None self.ts = 1500000000000 diff --git a/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py b/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py index 2e107561b51ef612dd9b903bf95696221eeaed10..1590a5948b46c84ea789de678a335b090bb5d951 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py @@ -26,7 +26,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py index 3fe6a689cba356125262dda89d8d2a9d7f6bf058..52c9773544ac672c34c0eeca55655fc8ca437f9a 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py @@ -26,7 +26,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py index 0d56729280a313a6df41ed8b0743974106a026da..4d641b0e275e3ff1515cdf24fff74992af11f6c6 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py @@ -26,7 +26,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py index a215a74559e6bb894c3058534946099f9157d5a7..eba456d1c27b142bebe724f402d209ffd7100a05 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py @@ -25,7 +25,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py index 9df1ffb3df376e0916be4ff44420affd2b583f9a..194915719154995ab22b3f452318d87e6a25d14a 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py @@ -25,7 +25,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py index caaf1dd898b1672f04624bf32ff2aad9b204a95c..382144b69c38f204b503a2cbed8e7cfea46a9617 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py @@ -26,7 +26,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py index 58ed8cde632b5fc513925f650dd5625de851c370..9acb31320343d564578271651fcb8293f2542cf4 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py @@ -25,13 +25,12 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) self.host = socket.gethostname() - - + self.replicaVar = replicaVar def getBuildPath(self): selfPath = os.path.dirname(os.path.realpath(__file__)) @@ -88,7 +87,7 @@ class TDTestCase: vnodeNumbers = int(dnodeNumbers-mnodeNums) allDbNumbers=(paraDict['dbNumbers']*restartNumbers) allStbNumbers=(paraDict['stbNumbers']*restartNumbers) - + paraDict['replica']=int(self.replicaVar) tdLog.info("first check dnode and mnode") tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) @@ -172,7 +171,7 @@ class TDTestCase: def run(self): # print(self.master_dnode.cfgDict) - self.fiveDnodeThreeMnode(dnodeNumbers=5,mnodeNums=3,restartNumbers=5,stopRole='mnode') + self.fiveDnodeThreeMnode(dnodeNumbers=5,mnodeNums=3,restartNumbers=1,stopRole='mnode') def stop(self): tdSql.close() diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py index 3dc3e7ec65327dd53d9a441fb80e44150d95f4b7..e8e3b217a1eaaef0e8d7aac4272381088651061e 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py @@ -25,12 +25,12 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) self.host = socket.gethostname() - + self.replicaVar = replicaVar def getBuildPath(self): selfPath = os.path.dirname(os.path.realpath(__file__)) @@ -88,7 +88,7 @@ class TDTestCase: vnodeNumbers = int(dnodeNumbers-mnodeNums) allDbNumbers=(paraDict['dbNumbers']*restartNumbers) allStbNumbers=(paraDict['stbNumbers']*restartNumbers) - + paraDict['replica'] = self.replicaVar tdLog.info("first check dnode and mnode") tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) @@ -170,7 +170,7 @@ class TDTestCase: def run(self): # print(self.master_dnode.cfgDict) - self.fiveDnodeThreeMnode(dnodeNumbers=5,mnodeNums=3,restartNumbers=3,stopRole='mnode') + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=3,stopRole='mnode') def stop(self): tdSql.close() diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py index 9a94632a12ea7746cc2d2ff9a660f8c83dbdb9c6..14ae1a8a48bd9489eb763eb7eb3c3bc67e446d24 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py @@ -25,7 +25,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py index 6fbe262b8ed36e465b320a47ccd772a40040bc5f..056e3225e8c1dcc798c3792fb965485585c77ccb 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py @@ -25,7 +25,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py index 56bafe8abc61be627f1b5af82cfb2fa77b96ccb7..5fd79e4296570085246618d87d22b3949f6a8d70 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py @@ -25,7 +25,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None tdSql.init(conn.cursor()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py index 539e5e38a78f96ec745b27469d9ae53c0b53c64a..a34895ff42c94e5b4b201b0edbaf2d782eee3f60 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py @@ -25,7 +25,7 @@ import ctypes class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") # tdSql.init(conn.cursor()) # self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/5dnode3mnodeStop.py b/tests/system-test/6-cluster/5dnode3mnodeStop.py index c43d41199bf22fb562d94f8b90786e4411df335e..531688710a918c976e2cf708f4b3c5d83474c924 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStop.py @@ -24,7 +24,7 @@ from multiprocessing import Process class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py b/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py index 584dd645f6f20c900b49404c15ec80b19427e90b..76ff746b2e0619ef5d8d7b89f374b0ef06e7e8e8 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py @@ -24,7 +24,7 @@ from multiprocessing import Process class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py b/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py index 5638b01070c9547d0d5a0bde8a090d6bfd49eb43..142f88c0d9f0ccb08ec8e8d6ee6ba43737a1549f 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py @@ -25,7 +25,7 @@ from multiprocessing import Process class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py b/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py index 6daa4c260a00e2956a8c0955c7e37e2b4aa829ad..afa1c3dcc3192049ee0c33f17e29d269b526d403 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py @@ -24,7 +24,7 @@ from multiprocessing import Process class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py index dcd9e56a64470165962269825c62be65228d5bbb..780255604d58f2fdf27390278ac89d7d64d212ae 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py @@ -26,7 +26,7 @@ class MyDnodes(TDDnodes): class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py b/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py index 1644686568d3c77c02c9dde98433b06d6184a0ea..97134ac2d1c6fa6c6af36270577f26670b8ed476 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py @@ -24,7 +24,7 @@ from multiprocessing import Process class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/clusterCommonCreate.py b/tests/system-test/6-cluster/clusterCommonCreate.py index 299829144e5ddafceacc828614fe1d7a0d2ed98a..6c2017f91c7a1d3ada2dda4e67810fb7cbd738a3 100644 --- a/tests/system-test/6-cluster/clusterCommonCreate.py +++ b/tests/system-test/6-cluster/clusterCommonCreate.py @@ -33,7 +33,7 @@ from util.common import * # INSERT_DATA = 3 class ClusterComCreate: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdSql.init(conn.cursor()) # tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py index 8d07dc6b38b4a6c72f98849408388fb1fd3d4afc..435701bd8f0a76d8b5599deefe25cb21524299d1 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py @@ -18,7 +18,7 @@ import subprocess sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py index 470278cd8e5a0d778e4a268bbee60086db2dd6d5..f0d5e8328af38c848ce9f8ea4ea7e773bcf0d427 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py @@ -18,7 +18,7 @@ import subprocess sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py index 0484ee9f3307d0b5005eee19560dafc69418d7cc..8d0801500e7f5a14ba55c7d69524cf72b07a946b 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py @@ -18,7 +18,7 @@ import subprocess ,threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py index 60e3167304205643ff2981db8dd687401f1b220d..379615d3584d98e62b9d4f50657a98581c4ccb9c 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py @@ -18,7 +18,7 @@ import subprocess sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py index 0557836ab215ef83f34e1d0a530910a5c5701504..240169dbb6a112db4ef36ed90ac13ddc3e17acdb 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py @@ -21,7 +21,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py index 8523ac72a4021f247c694cb3d3670b48157a69da..25b5de5afaf57818d0234212797dfeb35241a997 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py @@ -18,7 +18,7 @@ import subprocess ,threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py index 8e7ac388fb51cd101b9edf112c049664cb9d07b5..ab5359601a5532297d9640c0b20d5701778c5895 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py @@ -18,7 +18,7 @@ import subprocess ,threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py index 37c00c4b8daa94db8d2db299fcc9902c2135c116..4eec3c348df297784fc0bed602fd8900f82a4ab2 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py @@ -18,7 +18,7 @@ import subprocess ,threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py index f1ff805f0808fbad779b54a560890ce1700bd43f..0fe18ab705252bf06ef61e3f0746969d0b15df59 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py @@ -18,7 +18,7 @@ import subprocess ,threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py index 07231555feb4a2d5ce81f117802df7bc8291fcdc..75a7ca51b6a6943c22419cccbd73ecff706934a3 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py @@ -21,7 +21,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py index 80d367db017b43fb741a6cf4b499991d211087c1..e9c63151f33ab3dffc4308710b024e3c3e04b28e 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py @@ -21,7 +21,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py index 55a2318817b09b9bb74360cc3dfda2a0a21a50b5..5dd57542b3c629a66a9ab082f8ffcfbdbc443991 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py @@ -21,7 +21,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py index 489e2acd43c625eb9fc00a239b255589dd4c0ec3..fd00e89216187cb474d419a13abde5f52f4e6cc0 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py @@ -21,7 +21,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py index ee0ab26f4ce9dcac4e3d76ed9bd1779a484cb90f..f98e2c07b533e8f0e35f3d82ca6a2cc59c57b751 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py @@ -19,7 +19,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py index c7895abe047a8a8d0dd34c9d5044e8cad6a19702..5be2b67c314668108bafa027e0e081181e6e52a8 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py @@ -19,7 +19,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py index aca188824d65827ff7541c60e15f178efd225deb..e8fa3099e9947ed4d0eb00c3c54c002f16878c32 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py @@ -18,7 +18,7 @@ import subprocess ,threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py index fa6964307962e78de0997391e0b4dc552b16f823..21d0c2d2b86bd393d30e6e21449d9a211858957a 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py @@ -21,7 +21,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py index 0ef8db9c0fb96f9515e81abac2d119e9824a8f59..ff6ce98c819a77691e0cbcc2cca2966cfeebb0c5 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py @@ -21,7 +21,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py index f26df70c4efe0c6d2454595188ac4aa9aea1b895..e36f488c2b883b114fe33d3c1a4816d9b59bf40e 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py @@ -21,7 +21,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py index 2f57af39b019fed0bf1caf672555250cd20be5af..050b98024d44241b714d18d8b42c45214c0a6d54 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py @@ -21,7 +21,7 @@ import threading sys.path.append(os.path.dirname(__file__)) class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py index 221053d16540816ec64a45916a72fa5e07459d46..d086743306bd206752574325288e6ca4eb063f0b 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py @@ -17,7 +17,7 @@ import socket import subprocess class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py index 05ec8efcd27ae2972955498f6b6696eaba944814..b9d3afa76536a0369b26940251a82a34ff3d97c4 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py @@ -19,7 +19,7 @@ import socket import subprocess class TDTestCase: - def init(self,conn ,logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/7-tmq/basic5.py b/tests/system-test/7-tmq/basic5.py index 9531541f137a0de2bea23cb7e87bde17b85430e5..d1985c656708c59f99e1e616964747bcb6cfee96 100644 --- a/tests/system-test/7-tmq/basic5.py +++ b/tests/system-test/7-tmq/basic5.py @@ -26,7 +26,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/create_wrong_topic.py b/tests/system-test/7-tmq/create_wrong_topic.py index d18cb0260e90c721c37202e5d08bbaaa0a48da10..dbdcedcbe83bbe2aee89bde685750a0af9aa1a1a 100644 --- a/tests/system-test/7-tmq/create_wrong_topic.py +++ b/tests/system-test/7-tmq/create_wrong_topic.py @@ -13,7 +13,7 @@ from util.dnodes import * from util.sqlset import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(),logSql) self.setsql = TDSetSql() diff --git a/tests/system-test/7-tmq/dataFromTsdbNWal-multiCtb.py b/tests/system-test/7-tmq/dataFromTsdbNWal-multiCtb.py index 4add73ec2b7fb804d05c9ef45d6563f1c9edfe1b..484969010ca4ecd76423c7e9d098fd4d76fb7edf 100644 --- a/tests/system-test/7-tmq/dataFromTsdbNWal-multiCtb.py +++ b/tests/system-test/7-tmq/dataFromTsdbNWal-multiCtb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 100 self.rowsPerTbl = 1000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/dataFromTsdbNWal.py b/tests/system-test/7-tmq/dataFromTsdbNWal.py index 950c8fdcf6218fb6a0cc54573009bef41ffc0ffd..ed22df2b0757020c33275c9cbb3641397d3d7684 100644 --- a/tests/system-test/7-tmq/dataFromTsdbNWal.py +++ b/tests/system-test/7-tmq/dataFromTsdbNWal.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 1 self.rowsPerTbl = 10000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/db.py b/tests/system-test/7-tmq/db.py index da5d7fefd2b2ca2f06ceaf81d6ceb116e8bbdfcd..17668d8d03d4dcb40116f750fe8f6d62ccc43d05 100644 --- a/tests/system-test/7-tmq/db.py +++ b/tests/system-test/7-tmq/db.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/dropDbR3ConflictTransaction.py b/tests/system-test/7-tmq/dropDbR3ConflictTransaction.py index fc4fdcecf9f31dc341f1a26d49b4d7efda5deae3..af6c51d947db20bbd6e4609a5e5a590a5215a5f1 100644 --- a/tests/system-test/7-tmq/dropDbR3ConflictTransaction.py +++ b/tests/system-test/7-tmq/dropDbR3ConflictTransaction.py @@ -26,7 +26,7 @@ class TDTestCase: self.ctbNum = 2 self.rowsPerTbl = 2 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/schema.py b/tests/system-test/7-tmq/schema.py index 34d36e57927ca8605b11deeac7a1c4165bbf9905..2a67cd1bc199917ec975719ae99074aee0021039 100644 --- a/tests/system-test/7-tmq/schema.py +++ b/tests/system-test/7-tmq/schema.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/stbFilter.py b/tests/system-test/7-tmq/stbFilter.py index 4942a39db458f0e307649903e7449295d8909cc3..0f0e7c528763a7c67630bef5892c42d905da982f 100644 --- a/tests/system-test/7-tmq/stbFilter.py +++ b/tests/system-test/7-tmq/stbFilter.py @@ -15,7 +15,7 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/stbTagFilter-1ctb.py b/tests/system-test/7-tmq/stbTagFilter-1ctb.py index 6cb152342be5c80b5f755d0b3f2f7e7bf1c7894a..0ef454f3e28f938db141f136ea048b1c356ea4c3 100644 --- a/tests/system-test/7-tmq/stbTagFilter-1ctb.py +++ b/tests/system-test/7-tmq/stbTagFilter-1ctb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 1 self.rowsPerTbl = 10000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/stbTagFilter-multiCtb.py b/tests/system-test/7-tmq/stbTagFilter-multiCtb.py index 9053bf26206f73950018f41e05e247fe9e36c181..0ec114d3bdea5e25e6b0406b94e86901f1e75ffe 100644 --- a/tests/system-test/7-tmq/stbTagFilter-multiCtb.py +++ b/tests/system-test/7-tmq/stbTagFilter-multiCtb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 100 self.rowsPerTbl = 1000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/subscribeDb.py b/tests/system-test/7-tmq/subscribeDb.py index ba46f72695fb607ba14f48821db37cce1da1d441..3790bd169015a23e4c2ac465076496fefe65a257 100644 --- a/tests/system-test/7-tmq/subscribeDb.py +++ b/tests/system-test/7-tmq/subscribeDb.py @@ -20,7 +20,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file @@ -209,7 +209,7 @@ class TDTestCase: # wait for data ready prepareEnvThread.join() - tdLog.info("insert process end, and start to check consume result") + tdLog.info("1-insert process end, and start to check consume result") expectRows = 1 resultList = self.selectConsumeResult(expectRows) totalConsumeRows = 0 @@ -310,7 +310,7 @@ class TDTestCase: # wait for data ready prepareEnvThread.join() - tdLog.info("insert process end, and start to check consume result") + tdLog.info("2-insert process end, and start to check consume result") expectRows = 2 resultList = self.selectConsumeResult(expectRows) totalConsumeRows = 0 @@ -379,7 +379,7 @@ class TDTestCase: # wait for data ready prepareEnvThread.join() - tdLog.info("insert process end, and start to check consume result") + tdLog.info("3-insert process end, and start to check consume result") expectRows = 2 resultList = self.selectConsumeResult(expectRows) totalConsumeRows = 0 @@ -459,7 +459,7 @@ class TDTestCase: prepareEnvThread.join() prepareEnvThread2.join() - tdLog.info("insert process end, and start to check consume result") + tdLog.info("4-insert process end, and start to check consume result") expectRows = 1 resultList = self.selectConsumeResult(expectRows) totalConsumeRows = 0 diff --git a/tests/system-test/7-tmq/subscribeDb0.py b/tests/system-test/7-tmq/subscribeDb0.py index 7720001fbb79353e8c81eea89aded209f1a8fc99..81d824156d5da61be692d0be1a9b7eed7968aed9 100644 --- a/tests/system-test/7-tmq/subscribeDb0.py +++ b/tests/system-test/7-tmq/subscribeDb0.py @@ -20,7 +20,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/subscribeDb1.py b/tests/system-test/7-tmq/subscribeDb1.py index 404938158f55b5ff82958b73711054b5b9d5edc6..02e72d04755c6de1d4a0c2b2d0996a11930822bd 100644 --- a/tests/system-test/7-tmq/subscribeDb1.py +++ b/tests/system-test/7-tmq/subscribeDb1.py @@ -20,7 +20,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/subscribeDb2.py b/tests/system-test/7-tmq/subscribeDb2.py index 4702aef035081abcf51d619fda2a26f666174d1b..edf1a8ec8005d5c085b95dd1f3011dd437cd0008 100644 --- a/tests/system-test/7-tmq/subscribeDb2.py +++ b/tests/system-test/7-tmq/subscribeDb2.py @@ -21,7 +21,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/subscribeDb3.py b/tests/system-test/7-tmq/subscribeDb3.py index 0ff609ab6bc1cbeac9c02dead2ed06b6b7d6f5d0..34df61dc09bf65efaa7bb5363f2fa5dba076973b 100644 --- a/tests/system-test/7-tmq/subscribeDb3.py +++ b/tests/system-test/7-tmq/subscribeDb3.py @@ -20,7 +20,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/subscribeDb4.py b/tests/system-test/7-tmq/subscribeDb4.py index d253c34a532eb122b9479537ff30129be20018fb..27efbee016e77ac56d34331914901859fcba4cfd 100644 --- a/tests/system-test/7-tmq/subscribeDb4.py +++ b/tests/system-test/7-tmq/subscribeDb4.py @@ -51,7 +51,7 @@ class TDTestCase: hostname = socket.gethostname() - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") logSql = False tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/7-tmq/subscribeStb.py b/tests/system-test/7-tmq/subscribeStb.py index 2757e590a3904dfcd584ae8e35c5e861dcbbb9db..213f9aa89cfc90a1cb5028488ebd4f0805ac001d 100644 --- a/tests/system-test/7-tmq/subscribeStb.py +++ b/tests/system-test/7-tmq/subscribeStb.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/subscribeStb0.py b/tests/system-test/7-tmq/subscribeStb0.py index 26e834ae2c4ce898ee57971a8eb0066d0ad24838..0c188754b2d83220a2aa8853e13c22dbe5cd8bef 100644 --- a/tests/system-test/7-tmq/subscribeStb0.py +++ b/tests/system-test/7-tmq/subscribeStb0.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/subscribeStb1.py b/tests/system-test/7-tmq/subscribeStb1.py index 0c49636b158b9b3dc4c810bf4bfd10fac0cc4473..4d5407e9277480b8a32cb10e066853fde195630f 100644 --- a/tests/system-test/7-tmq/subscribeStb1.py +++ b/tests/system-test/7-tmq/subscribeStb1.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/subscribeStb2.py b/tests/system-test/7-tmq/subscribeStb2.py index 2cbb16ec0027930c7f02ae7fc50a69117fb77f9f..bb38a981d38573c63da84eefa4521f63222ed834 100644 --- a/tests/system-test/7-tmq/subscribeStb2.py +++ b/tests/system-test/7-tmq/subscribeStb2.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/subscribeStb3.py b/tests/system-test/7-tmq/subscribeStb3.py index 9c1b3fd241fffd1d3c09f914549291983a5f9505..32272491c63d5e7dc9ce644c2d55921b11e15270 100644 --- a/tests/system-test/7-tmq/subscribeStb3.py +++ b/tests/system-test/7-tmq/subscribeStb3.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/subscribeStb4.py b/tests/system-test/7-tmq/subscribeStb4.py index 33f4c4af1a87bfef576fc0fb702d65732711ab95..e347d27ac1a3c62ae7b06aee07f5909a13dcbebb 100644 --- a/tests/system-test/7-tmq/subscribeStb4.py +++ b/tests/system-test/7-tmq/subscribeStb4.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmq3mnodeSwitch.py b/tests/system-test/7-tmq/tmq3mnodeSwitch.py index 7ba914c05cdb9995080b0e5d856d22e970798631..837317e5d7f883abdd54602d1987dce8d59779a8 100644 --- a/tests/system-test/7-tmq/tmq3mnodeSwitch.py +++ b/tests/system-test/7-tmq/tmq3mnodeSwitch.py @@ -32,7 +32,7 @@ class TDTestCase: self.portStep = 100 self.dnodeOfLeader = 0 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqAlterSchema.py b/tests/system-test/7-tmq/tmqAlterSchema.py index 232a1e11faaf0474ebd12cb8fa83e15bc94bf6da..3bff0e4754e11c0a4271694011355dd780c53bd0 100644 --- a/tests/system-test/7-tmq/tmqAlterSchema.py +++ b/tests/system-test/7-tmq/tmqAlterSchema.py @@ -32,7 +32,7 @@ class TDTestCase: self.portStep = 100 self.dnodeOfLeader = 0 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqAutoCreateTbl.py b/tests/system-test/7-tmq/tmqAutoCreateTbl.py index ce2cad4b148a22d15dbc831ff5824f9ed66d651e..568e49388bd1ff540aac114f960c45b480d04d7d 100644 --- a/tests/system-test/7-tmq/tmqAutoCreateTbl.py +++ b/tests/system-test/7-tmq/tmqAutoCreateTbl.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 500 self.rowsPerTbl = 1000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqCheckData.py b/tests/system-test/7-tmq/tmqCheckData.py index 9338debfa6f5f9161cfa700dd2c3fdbdaa2fa8b7..9995af15c241f8b409d5d760a64a7d4e07e6d1d3 100644 --- a/tests/system-test/7-tmq/tmqCheckData.py +++ b/tests/system-test/7-tmq/tmqCheckData.py @@ -15,7 +15,7 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqCheckData1.py b/tests/system-test/7-tmq/tmqCheckData1.py index 7c236bbe8bbfb6f0a1c66f3c7e1340081304a9f5..5b055cf7251af43d28fdcaee5d891e9ac9448be2 100644 --- a/tests/system-test/7-tmq/tmqCheckData1.py +++ b/tests/system-test/7-tmq/tmqCheckData1.py @@ -15,7 +15,7 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqCommon.py b/tests/system-test/7-tmq/tmqCommon.py index b1455ebe48d03e314a5421fbb8fa3bd4d41ab9d9..e71e4d257d8f0322c24a9912493b76efded414d8 100644 --- a/tests/system-test/7-tmq/tmqCommon.py +++ b/tests/system-test/7-tmq/tmqCommon.py @@ -37,7 +37,7 @@ from util.common import * # INSERT_DATA = 3 class TMQCom: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdSql.init(conn.cursor()) # tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py b/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py index 20b0c65c714cda7709ba80d6289c628d0de2922e..655097c92422ec26021e5bb8c0a25a51c3d4a6a5 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 1 self.rowsPerTbl = 100000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb.py b/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb.py index 494952ecd5538b47d2bf59167cb6f4d934049f13..709464fc1e4058c384aa74bf630aac453a6ac387 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 1 self.rowsPerTbl = 100000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py b/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py index 666ca6ca646937fb29ea9ec6346ebd97e5351dae..09ad6e38c954ab471a8665c3c086d7986f735060 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 3000 self.rowsPerTbl = 150 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py b/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py index e4ce3b0f773218a78c411d1aae31aca8da11c350..95e060d5814869290ed7eb4979d2b4072767f84d 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 3000 self.rowsPerTbl = 70 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg.py b/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg.py index da7d9e4651325c45ef071285bea03a4b4984c84c..fc3437613b4013dd8d2dd6b64d91b32627018686 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 10 self.rowsPerTbl = 10000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb.py b/tests/system-test/7-tmq/tmqConsFromTsdb.py index b3bb5f84e43f8257eeb60e16a4f149e28d0a1496..73af4d196fa40011b9077197c1cb739d4a7a49f1 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 10 self.rowsPerTbl = 10000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py b/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py index 07fb9c77515411f43035374ba8c46972777788cd..20db44ef1912896fd0cf4a0d44ec3ce7902c0fb4 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 1 self.rowsPerTbl = 1000000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb.py b/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb.py index 313ff7476e3b2144470766741ef6ab2a77a14336..bd42f74c03f263d7e1d41224f92e47fed49ddc2e 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 1 self.rowsPerTbl = 100000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py index 05f7030169490c1e9bf2dbe321efee4cbe0bd7d0..2eb1a7c52a046fa09417795354314286511cf0ca 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 4000 self.rowsPerTbl = 150 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py index 232d90848fc08c74c46308147942c90e85e7d509..351a10ed1f7fcfefa77368adfe8404084fb64875 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 3000 self.rowsPerTbl = 70 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py index 5841c6d60534eef7a98c5fd6aa0abe629fc4ebb7..65042749931fa5c348a402d40977ec9b65596778 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 10 self.rowsPerTbl = 10000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsFromTsdb1.py b/tests/system-test/7-tmq/tmqConsFromTsdb1.py index d0ab8d4fe30b8c39de75214b21c8daa6c3ff75e6..2cfb6581d83318928dae30fbaa0140f4a39d9b1d 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 10 self.rowsPerTbl = 10000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqConsumerGroup.py b/tests/system-test/7-tmq/tmqConsumerGroup.py index b5cbfb8a5115d5bc268e264ea9d9d5cdd1b6bef7..5c7d21069b479300c9de328d43d06c562b503d99 100644 --- a/tests/system-test/7-tmq/tmqConsumerGroup.py +++ b/tests/system-test/7-tmq/tmqConsumerGroup.py @@ -15,7 +15,7 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqDelete-1ctb.py b/tests/system-test/7-tmq/tmqDelete-1ctb.py index 8329b00145d71ab6df045f23fb20dc015034a2c2..7509e43af7a7f9f3654d68ea3789d68984f83ff6 100644 --- a/tests/system-test/7-tmq/tmqDelete-1ctb.py +++ b/tests/system-test/7-tmq/tmqDelete-1ctb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 1 self.rowsPerTbl = 10000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqDelete-multiCtb.py b/tests/system-test/7-tmq/tmqDelete-multiCtb.py index c9d90b45bee55119ecce1f8950ec02461e769c97..ded6fe94d7cf3032e4d2410b5830a487424656a7 100644 --- a/tests/system-test/7-tmq/tmqDelete-multiCtb.py +++ b/tests/system-test/7-tmq/tmqDelete-multiCtb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 100 self.rowsPerTbl = 1000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqDnode.py b/tests/system-test/7-tmq/tmqDnode.py index 802993e9247254b069383d67c050a4449ee7a1e4..921e543e2d1544402a2937e3e51546afb7055f4e 100644 --- a/tests/system-test/7-tmq/tmqDnode.py +++ b/tests/system-test/7-tmq/tmqDnode.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqDnodeRestart.py b/tests/system-test/7-tmq/tmqDnodeRestart.py index 925692dbb814ce0bf257272c881f113178484b20..205f513351e31145c17595bd07e559d5f51b6945 100644 --- a/tests/system-test/7-tmq/tmqDnodeRestart.py +++ b/tests/system-test/7-tmq/tmqDnodeRestart.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 100 self.rowsPerTbl = 1000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqDropNtb-snapshot0.py b/tests/system-test/7-tmq/tmqDropNtb-snapshot0.py index b952dc2d572aa85e1819519d40e563086df1c4a9..0d75df58f9ed2ae8b1f12326fddde189954ac29a 100644 --- a/tests/system-test/7-tmq/tmqDropNtb-snapshot0.py +++ b/tests/system-test/7-tmq/tmqDropNtb-snapshot0.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 1000 self.rowsPerTbl = 10 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqDropNtb-snapshot1.py b/tests/system-test/7-tmq/tmqDropNtb-snapshot1.py index 4cb208b616097815ce8dfb099854c5c936fcf08c..79cb79a83cf78b4aac55aa0103e4ec9f2b4ed83c 100644 --- a/tests/system-test/7-tmq/tmqDropNtb-snapshot1.py +++ b/tests/system-test/7-tmq/tmqDropNtb-snapshot1.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 1000 self.rowsPerTbl = 10 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqDropStb.py b/tests/system-test/7-tmq/tmqDropStb.py index b172224c2a1651fabf3779e07e7d0ab5706b2ba9..7679f0ca44c289285f79797168d2175e19fc1337 100644 --- a/tests/system-test/7-tmq/tmqDropStb.py +++ b/tests/system-test/7-tmq/tmqDropStb.py @@ -51,7 +51,7 @@ class TDTestCase: hostname = socket.gethostname() - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") logSql = False tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/7-tmq/tmqDropStbCtb.py b/tests/system-test/7-tmq/tmqDropStbCtb.py index 704811d083c47db53592cce8db85c71733a29057..95780538d16636c02b1532001e3ab7b01b0e2ac5 100644 --- a/tests/system-test/7-tmq/tmqDropStbCtb.py +++ b/tests/system-test/7-tmq/tmqDropStbCtb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 100 self.rowsPerTbl = 1000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqError.py b/tests/system-test/7-tmq/tmqError.py index 27f1e39ddd3b7329a1bd5c6a2efe694d8f846462..7ee9e5d16921c7d33eb357e999a893ec11d0f1a3 100644 --- a/tests/system-test/7-tmq/tmqError.py +++ b/tests/system-test/7-tmq/tmqError.py @@ -29,7 +29,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqModule.py b/tests/system-test/7-tmq/tmqModule.py index 1ff47da15922c1ebc51c9ee72a2e155eaac81d4f..0063edce564b5c3429ed1c563def5e651a15bfa0 100644 --- a/tests/system-test/7-tmq/tmqModule.py +++ b/tests/system-test/7-tmq/tmqModule.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqShow.py b/tests/system-test/7-tmq/tmqShow.py index f348173d6d6bb1b4bec5f99f68110a8457c472d2..d0b46bf572c01fe27e6597242386094b99f9d310 100644 --- a/tests/system-test/7-tmq/tmqShow.py +++ b/tests/system-test/7-tmq/tmqShow.py @@ -15,7 +15,7 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqSubscribeStb-r3.py b/tests/system-test/7-tmq/tmqSubscribeStb-r3.py index c5f98bc3a004e8aa20918fe1482e38ef10705416..33b8268a88f1b1ccd9a7318e37e9d5efb777d653 100644 --- a/tests/system-test/7-tmq/tmqSubscribeStb-r3.py +++ b/tests/system-test/7-tmq/tmqSubscribeStb-r3.py @@ -27,7 +27,7 @@ class TDTestCase: self.ctbNum = 1000 self.rowsPerTbl = 100 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot0.py b/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot0.py index f70c6ad49bc259185231caecc04c05160b816f4c..8158249fa6b4b5550447e04e03587b453ec042fa 100644 --- a/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot0.py +++ b/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot0.py @@ -23,7 +23,7 @@ class TDTestCase: self.ctbNum = 100 self.rowsPerTbl = 1000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot1.py b/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot1.py index 58cdc775eed67e7db14e56f255e292f2d67e5948..97e50cf6546414b3f23a43888e7397e25511ce48 100644 --- a/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot1.py +++ b/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot1.py @@ -23,7 +23,7 @@ class TDTestCase: self.ctbNum = 100 self.rowsPerTbl = 1000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqUdf.py b/tests/system-test/7-tmq/tmqUdf.py index 5eac0ae69d643045777a2976de39d6b54d2e1cee..d081423142aff268ee4e2677d25396e68cddf8d1 100644 --- a/tests/system-test/7-tmq/tmqUdf.py +++ b/tests/system-test/7-tmq/tmqUdf.py @@ -23,7 +23,7 @@ class TDTestCase: self.ctbNum = 1 self.rowsPerTbl = 1000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/7-tmq/tmqUpdate-1ctb.py b/tests/system-test/7-tmq/tmqUpdate-1ctb.py index 12de04cd9c525e4ae8bc9aaa70d45942e7c3c0e2..a95920b7c4e4dc9e92726ae0c8795fff76388a1d 100644 --- a/tests/system-test/7-tmq/tmqUpdate-1ctb.py +++ b/tests/system-test/7-tmq/tmqUpdate-1ctb.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 1 self.rowsPerTbl = 10000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot0.py b/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot0.py index 02641d8bcb0603c7e2caf3e2486a577e62176269..0ced8fc34b6c0fc5b6bbe93e87b22e7ca68f4add 100644 --- a/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot0.py +++ b/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot0.py @@ -22,7 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000 self.autoCtbPrefix = 'aCtb' - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot1.py b/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot1.py index baeb70e65680aa731d9db4eb28385b24e67d9a47..bdcbb9578ea5fe10b690e8c57225f4d0884177fd 100644 --- a/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot1.py +++ b/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot1.py @@ -22,7 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000 self.autoCtbPrefix = 'aCtb' - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqUpdate-multiCtb.py b/tests/system-test/7-tmq/tmqUpdate-multiCtb.py index bde266e63401f27e1ff9bfb1085fc26636e0bc77..df150130c0f9e14e7fc1d0fd411c051b88feaf13 100644 --- a/tests/system-test/7-tmq/tmqUpdate-multiCtb.py +++ b/tests/system-test/7-tmq/tmqUpdate-multiCtb.py @@ -22,7 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000 self.autoCtbPrefix = 'aCtb' - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmqUpdateWithConsume.py b/tests/system-test/7-tmq/tmqUpdateWithConsume.py index be07ba13a978a8705f014b04ee7c09ba37e3a33b..dbeac427ac2620cd9dfdb76d8eb17718fd4d2bae 100644 --- a/tests/system-test/7-tmq/tmqUpdateWithConsume.py +++ b/tests/system-test/7-tmq/tmqUpdateWithConsume.py @@ -21,7 +21,7 @@ class TDTestCase: self.ctbNum = 100 self.rowsPerTbl = 1000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/7-tmq/tmq_taosx.py b/tests/system-test/7-tmq/tmq_taosx.py index 626e935733a19b47a9524c474614ac816ef38bbe..fd7e1b7bb1508d81687cf436fc871d0c7e74f70c 100644 --- a/tests/system-test/7-tmq/tmq_taosx.py +++ b/tests/system-test/7-tmq/tmq_taosx.py @@ -15,7 +15,7 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/99-TDcase/TD-15517.py b/tests/system-test/99-TDcase/TD-15517.py index fe2d9b9041f8a5b43f5a56189799e63105c9c809..e45a54c2721ed4ec78246c4f5abca535e536841d 100644 --- a/tests/system-test/99-TDcase/TD-15517.py +++ b/tests/system-test/99-TDcase/TD-15517.py @@ -20,7 +20,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") #tdSql.init(conn.cursor()) tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/99-TDcase/TD-15554.py b/tests/system-test/99-TDcase/TD-15554.py index 16a34086b7854da1126c4e5dfe30cf49d3c180f1..02654b5703f704159d0eb126c10321cf2738e3ec 100644 --- a/tests/system-test/99-TDcase/TD-15554.py +++ b/tests/system-test/99-TDcase/TD-15554.py @@ -19,7 +19,7 @@ class TDTestCase: #updatecfgDict["clientCfg"] = clientCfgDict #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") #tdSql.init(conn.cursor()) tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/99-TDcase/TD-15557.py b/tests/system-test/99-TDcase/TD-15557.py index 243a0a4d7e25f64ec0840127e9321d06527bcd17..ca29e1282f85dd4634bb44391e86dad6a55e9943 100644 --- a/tests/system-test/99-TDcase/TD-15557.py +++ b/tests/system-test/99-TDcase/TD-15557.py @@ -20,7 +20,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") #tdSql.init(conn.cursor()) tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/99-TDcase/TD-15563.py b/tests/system-test/99-TDcase/TD-15563.py index 74b5472d89f70acf0ccf7bb0e0d0bb3bab0b253d..6b37f25bb6de65981056a365c581bd008efcb454 100644 --- a/tests/system-test/99-TDcase/TD-15563.py +++ b/tests/system-test/99-TDcase/TD-15563.py @@ -20,7 +20,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") #tdSql.init(conn.cursor()) tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/99-TDcase/TD-16025.py b/tests/system-test/99-TDcase/TD-16025.py index 4cf94f5dafa2145bf2ce761e508c38c521321114..0adc3134293197dc24f096706f9827e5cb6b0077 100644 --- a/tests/system-test/99-TDcase/TD-16025.py +++ b/tests/system-test/99-TDcase/TD-16025.py @@ -27,7 +27,7 @@ class TDTestCase: #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal #print ("===================: ", updatecfgDict) - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") #tdSql.init(conn.cursor()) tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/99-TDcase/TD-16821.py b/tests/system-test/99-TDcase/TD-16821.py index 31c1c34485daa75b469d2278f4b9b7dce3523fdd..b2b5e3f425e4547f6e305be8b4fd4acdb6ee1be0 100644 --- a/tests/system-test/99-TDcase/TD-16821.py +++ b/tests/system-test/99-TDcase/TD-16821.py @@ -15,7 +15,7 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) #tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/99-TDcase/TD-17255.py b/tests/system-test/99-TDcase/TD-17255.py index 5d18fee8d2cadd955ed7f5a38026b02b4fc16994..bcf02b654fdeaa540480412b22305e2477974cb6 100644 --- a/tests/system-test/99-TDcase/TD-17255.py +++ b/tests/system-test/99-TDcase/TD-17255.py @@ -20,7 +20,7 @@ class TDTestCase: self.ctbNum = 100 self.rowsPerTbl = 10000 - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/99-TDcase/TD-17699.py b/tests/system-test/99-TDcase/TD-17699.py index 40650e4b924c52319241aaee1b9f20c43f60cf4f..d4c4a4cc32f3d034e312929146add212782745fa 100644 --- a/tests/system-test/99-TDcase/TD-17699.py +++ b/tests/system-test/99-TDcase/TD-17699.py @@ -52,7 +52,7 @@ class TDTestCase: hostname = socket.gethostname() - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") logSql = False tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/99-TDcase/TD-19201.py b/tests/system-test/99-TDcase/TD-19201.py index 26caa27815e427364e9275502bf062236e6fca38..0fd86bf6b4f3002aa96d4fc4b6e02e56caab1525 100644 --- a/tests/system-test/99-TDcase/TD-19201.py +++ b/tests/system-test/99-TDcase/TD-19201.py @@ -13,7 +13,7 @@ from util.dnodes import * class TDTestCase: hostname = socket.gethostname() - def init(self, conn, logSql): + def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") #tdSql.init(conn.cursor()) tdSql.init(conn.cursor(), logSql) # output sql.txt file diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh old mode 100644 new mode 100755 index 6b87377df76af831df81848d848355988311eda2..8529f8d99b5109bcbb5f7eefb683084d385ccb0d --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -239,7 +239,8 @@ python3 ./test.py -f 6-cluster/5dnode3mnodeStopLoop.py -N 5 -M 3 python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py -N 5 -M 3 python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py -N 5 -M 3 python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py -N 5 -M 3 -python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py -N 5 -M 3 +python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py -N 6 -M 3 +python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py -N 6 -M 3 -n 3 python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py -N 5 -M 3 python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py -N 5 -M 3 diff --git a/tests/system-test/test.py b/tests/system-test/test.py index dd49f037bd9bc75f5db41c3a9c6a560a59910587..b25bda4a3b1b8c9a19b9e6687ca95bb0eb70d9b9 100644 --- a/tests/system-test/test.py +++ b/tests/system-test/test.py @@ -72,8 +72,9 @@ if __name__ == "__main__": queryPolicy = 1 createDnodeNums = 1 restful = False - opts, args = getopt.gnu_getopt(sys.argv[1:], 'f:p:m:l:scghrd:k:e:N:M:Q:C:RD:', [ - 'file=', 'path=', 'master', 'logSql', 'stop', 'cluster', 'valgrind', 'help', 'restart', 'updateCfgDict', 'killv', 'execCmd','dnodeNums','mnodeNums','queryPolicy','createDnodeNums','restful','adaptercfgupdate']) + replicaVar = 1 + opts, args = getopt.gnu_getopt(sys.argv[1:], 'f:p:m:l:scghrd:k:e:N:M:Q:C:RD:n:', [ + 'file=', 'path=', 'master', 'logSql', 'stop', 'cluster', 'valgrind', 'help', 'restart', 'updateCfgDict', 'killv', 'execCmd','dnodeNums','mnodeNums','queryPolicy','createDnodeNums','restful','adaptercfgupdate','replicaVar']) for key, value in opts: if key in ['-h', '--help']: tdLog.printNoPrefix( @@ -95,8 +96,7 @@ if __name__ == "__main__": tdLog.printNoPrefix('-C create Dnode Numbers in one cluster') tdLog.printNoPrefix('-R restful realization form') tdLog.printNoPrefix('-D taosadapter update cfg dict ') - - + tdLog.printNoPrefix('-n the number of replicas') sys.exit(0) if key in ['-r', '--restart']: @@ -168,6 +168,9 @@ if __name__ == "__main__": print('adapter cfg update convert fail.') sys.exit(0) + if key in ['-n', '--replicaVar']: + replicaVar = value + if not execCmd == "": if restful: tAdapter.init(deployPath) @@ -512,7 +515,7 @@ if __name__ == "__main__": if fileName == "all": tdCases.runAllLinux(conn) else: - tdCases.runOneLinux(conn, fileName) + tdCases.runOneLinux(conn, fileName, replicaVar) if restart: if fileName == "all": @@ -529,7 +532,7 @@ if __name__ == "__main__": conn = taosrest.connect(url=f"http://{host}:6041") tdLog.info("Procedures for tdengine deployed in %s" % (host)) tdLog.info("query test after taosd restart") - tdCases.runOneLinux(conn, sp[0] + "_" + "restart.py") + tdCases.runOneLinux(conn, sp[0] + "_" + "restart.py", replicaVar) else: tdLog.info("not need to query")