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 e09c8edce957915b60fe24864599c7f41800308c..d09a9e7a479cdf4c439a543f6cdd3d9b3e6980a5 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_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 083eff34e62c3773dc9b8abe12900e10468acf51..53ffc0bfd697f241bf2f3452ac56019ce20fea5b 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 54abcec391f423b9a367d1fa8cb601c449a00673..ec8f54fffadd79629f44b4462712bf95c48871b7 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(), False) diff --git a/tests/system-test/1-insert/database_pre_suf.py b/tests/system-test/1-insert/database_pre_suf.py index fc4bf7f5de2bffd5ad83f9936b633af7d0513169..a4aa8247ab7695fc3197e3db7e26483d9f57282e 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 09db1e45ba5c0ebab7d9054b43fa722e6ff0084c..1a9cd1a158c361e2d14da8df31e24c5665c7f971 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 417adc39acc306fbd7b2d74518653d0347fb27cb..e11b45190bfe65aa4ef3cfdd0d6730945ccb9c60 100644 --- a/tests/system-test/1-insert/update_data.py +++ b/tests/system-test/1-insert/update_data.py @@ -21,7 +21,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/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 4045b6ad88106e9fed718d00f08b3c113236ac91..46a1e42158d5b146673b1795f954bb307fecbe88 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/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 ceef3f93ebe09b68f0e8760df7ad40678b35110f..6ec17ec49a94c86fd994c44aa8eda4164bf4fe80 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 333c60286e68ea20daf465d4c8670a569377a852..03de3c35edfc52b98da73f9d30eba9d25abdf361 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 1dc5bdfa21dc468e28a5a9829ef0d9b39fabf885..2a63fd6d8e71aa1c806d9d77c3bd89ef683408f3 100644 --- a/tests/system-test/2-query/histogram.py +++ b/tests/system-test/2-query/histogram.py @@ -142,7 +142,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) @@ -304,7 +304,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 ) ) @@ -322,6 +324,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 ) ) @@ -335,6 +342,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 ") ) @@ -404,6 +418,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") def all_test(self, dbname=DBNAME): self.test_histogram(dbname) 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 3a05583418cd3fe11a099dbc7a4d1e3d22aa532b..afc8c06bdea945ee489698b171381229dc2cbc7e 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 3bca9f167108e71b591a825ed3dc3b5abb46f5df..0d721c836095466c020f140db027ed3e145f9b57 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 358d2b9551a1ee8db9446babd2588ee47404ac67..791065924c49514dfcfcaab14f20eed0654dae5d 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 5cc9a2d9e888425763914c01baeababfeebc6166..80e7fa7f045d6cd05658ec6ef0e92857e68d2209 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/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/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/smaTest.py b/tests/system-test/2-query/smaTest.py index 0217b6c28c2f44deb87c032957ef749fc329742e..66a89d870158246080f357c5e272cd81cebd628b 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() 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/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/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 ec77cbbcdc9d83d0a63b54fbe377c14d8645ce52..cf23328fa392a9bd9d8c4f1f6461730bec0088d7 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/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py index 58ed8cde632b5fc513925f650dd5625de851c370..575e2ef712351ce780d7b78376e0a1d94462995d 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=6,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..d24c7495157a295a35fe37cc6770d34eca5afc1b 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.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()) @@ -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/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/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..f738f816c7cc02c2b44f7be62bf699c0a351e857 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 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 bcc672584897cb4bee8219b229ecdcf64700bf53..cb7e3152cb7bedaa12b16327b3ce76b1ed06964d 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 2d7b464025f0b014620bf9f3eaea03f01dce27bf..757a3611f22914447553a129130d84ef5187e0dd 100644 --- a/tests/system-test/7-tmq/tmqError.py +++ b/tests/system-test/7-tmq/tmqError.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/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 0691da678668df5a35b61691daebbf58b76b14d2..6ff08498eab988ed427764d6878957d61bb4bacb 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 fd2ff916fdded503905dbac052f1cb57bf84433b..12a20821f82a46f73836d4d9a9fa57094168cc2a --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -2,35 +2,35 @@ set -e set -x -python3 ./test.py -f 0-others/taosShell.py -python3 ./test.py -f 0-others/taosShellError.py -python3 ./test.py -f 0-others/taosShellNetChk.py -python3 ./test.py -f 0-others/telemetry.py -python3 ./test.py -f 0-others/taosdMonitor.py -python3 ./test.py -f 0-others/udfTest.py -python3 ./test.py -f 0-others/udf_create.py -python3 ./test.py -f 0-others/udf_restart_taosd.py -python3 ./test.py -f 0-others/cachemodel.py -python3 ./test.py -f 0-others/udf_cfg1.py -python3 ./test.py -f 0-others/udf_cfg2.py -python3 ./test.py -f 0-others/taosdShell.py -N 5 -M 3 -Q 3 -python3 ./test.py -f 0-others/sysinfo.py -python3 ./test.py -f 0-others/user_control.py -python3 ./test.py -f 0-others/fsync.py -python3 ./test.py -f 0-others/compatibility.py -python3 ./test.py -f 1-insert/alter_database.py -python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.py -python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py -python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py -python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py -python3 ./test.py -f 1-insert/test_stmt_set_tbname_tag.py -python3 ./test.py -f 1-insert/alter_stable.py -python3 ./test.py -f 1-insert/alter_table.py -python3 ./test.py -f 1-insert/insertWithMoreVgroup.py -python3 ./test.py -f 1-insert/table_comment.py -python3 ./test.py -f 1-insert/time_range_wise.py -python3 ./test.py -f 1-insert/block_wise.py -python3 ./test.py -f 1-insert/create_retentions.py +# python3 ./test.py -f 0-others/taosShell.py +# python3 ./test.py -f 0-others/taosShellError.py +# python3 ./test.py -f 0-others/taosShellNetChk.py +# python3 ./test.py -f 0-others/telemetry.py +# python3 ./test.py -f 0-others/taosdMonitor.py +# python3 ./test.py -f 0-others/udfTest.py +# python3 ./test.py -f 0-others/udf_create.py +# python3 ./test.py -f 0-others/udf_restart_taosd.py +# python3 ./test.py -f 0-others/cachemodel.py +# python3 ./test.py -f 0-others/udf_cfg1.py +# python3 ./test.py -f 0-others/udf_cfg2.py +# python3 ./test.py -f 0-others/taosdShell.py -N 5 -M 3 -Q 3 +# python3 ./test.py -f 0-others/sysinfo.py +# python3 ./test.py -f 0-others/user_control.py +# python3 ./test.py -f 0-others/fsync.py +# python3 ./test.py -f 0-others/compatibility.py +# python3 ./test.py -f 1-insert/alter_database.py +# python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.py +# python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py +# python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py +# python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py +# python3 ./test.py -f 1-insert/test_stmt_set_tbname_tag.py +# python3 ./test.py -f 1-insert/alter_stable.py +# python3 ./test.py -f 1-insert/alter_table.py +# python3 ./test.py -f 1-insert/insertWithMoreVgroup.py +# python3 ./test.py -f 1-insert/table_comment.py +# python3 ./test.py -f 1-insert/time_range_wise.py +# python3 ./test.py -f 1-insert/block_wise.py +# python3 ./test.py -f 1-insert/create_retentions.py python3 ./test.py -f 1-insert/table_param_ttl.py python3 ./test.py -f 1-insert/mutil_stage.py python3 ./test.py -f 1-insert/table_param_ttl.py -R 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")