From 49eee4c074fc8608dd4042b22c6c77c952ca6713 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Wed, 2 Nov 2022 17:33:44 +0800 Subject: [PATCH 1/2] test:add replica parameters for all testcase --- .../taosbenchmark/auto_create_table_json.py | 3 ++- .../5-taos-tools/taosbenchmark/commandline.py | 3 ++- .../5-taos-tools/taosbenchmark/custom_col_tag.py | 3 ++- .../5-taos-tools/taosbenchmark/default_json.py | 3 ++- tests/develop-test/5-taos-tools/taosbenchmark/demo.py | 3 ++- .../5-taos-tools/taosbenchmark/insert_alltypes_json.py | 3 ++- .../5-taos-tools/taosbenchmark/invalid_commandline.py | 3 ++- .../5-taos-tools/taosbenchmark/json_tag.py | 3 ++- .../5-taos-tools/taosbenchmark/limit_offset_json.py | 3 ++- .../5-taos-tools/taosbenchmark/query_json.py | 3 ++- .../5-taos-tools/taosbenchmark/sample_csv_json.py | 3 ++- .../5-taos-tools/taosbenchmark/sml_interlace.py | 3 ++- .../5-taos-tools/taosbenchmark/sml_json_alltypes.py | 3 ++- .../5-taos-tools/taosbenchmark/sml_telnet_alltypes.py | 3 ++- .../5-taos-tools/taosbenchmark/taosadapter_json.py | 3 ++- .../5-taos-tools/taosbenchmark/telnet_tcp.py | 3 ++- .../5-taos-tools/taosdump/taosdumpTestInspect.py | 5 +++-- .../5-taos-tools/taosdump/taosdumpTestTypeBigInt.py | 5 +++-- .../5-taos-tools/taosdump/taosdumpTestTypeBinary.py | 5 +++-- .../5-taos-tools/taosdump/taosdumpTestTypeBool.py | 5 +++-- .../5-taos-tools/taosdump/taosdumpTestTypeDouble.py | 5 +++-- .../5-taos-tools/taosdump/taosdumpTestTypeFloat.py | 5 +++-- .../5-taos-tools/taosdump/taosdumpTestTypeInt.py | 5 +++-- .../5-taos-tools/taosdump/taosdumpTestTypeJson.py | 5 +++-- .../5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py | 5 +++-- .../5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py | 5 +++-- .../taosdump/taosdumpTestTypeUnsignedBigInt.py | 5 +++-- .../taosdump/taosdumpTestTypeUnsignedInt.py | 5 +++-- .../taosdump/taosdumpTestTypeUnsignedSmallInt.py | 5 +++-- .../taosdump/taosdumpTestTypeUnsignedTinyInt.py | 5 +++-- tests/system-test/0-others/cachemodel.py | 1 + tests/system-test/0-others/compatibility.py | 1 + tests/system-test/0-others/fsync.py | 1 + tests/system-test/0-others/show.py | 1 + tests/system-test/0-others/sysinfo.py | 1 + tests/system-test/0-others/taosShell.py | 1 + tests/system-test/0-others/taosShellError.py | 1 + tests/system-test/0-others/taosShellNetChk.py | 1 + tests/system-test/0-others/taosdMonitor.py | 1 + tests/system-test/0-others/taosdShell.py | 1 + tests/system-test/0-others/taosdlog.py | 1 + tests/system-test/0-others/telemetry.py | 1 + tests/system-test/0-others/udfTest.py | 1 + tests/system-test/0-others/udf_cfg1.py | 1 + tests/system-test/0-others/udf_cfg2.py | 1 + tests/system-test/0-others/udf_cluster.py | 1 + tests/system-test/0-others/udf_create.py | 1 + tests/system-test/0-others/udf_restart_taosd.py | 1 + tests/system-test/0-others/user_control.py | 1 + tests/system-test/1-insert/alter_database.py | 1 + tests/system-test/1-insert/alter_stable.py | 1 + tests/system-test/1-insert/alter_table.py | 1 + tests/system-test/1-insert/block_wise.py | 1 + tests/system-test/1-insert/create_retentions.py | 1 + tests/system-test/1-insert/database_pre_suf.py | 1 + tests/system-test/1-insert/db_tb_name_check.py | 1 + tests/system-test/1-insert/delete_data.py | 1 + .../system-test/1-insert/influxdb_line_taosc_insert.py | 1 + tests/system-test/1-insert/insertWithMoreVgroup.py | 1 + tests/system-test/1-insert/insert_drop.py | 1 + tests/system-test/1-insert/keep_expired.py | 1 + tests/system-test/1-insert/mutil_stage.py | 1 + tests/system-test/1-insert/mutipythonnodebugtaosd.py | 1 + .../system-test/1-insert/opentsdb_json_taosc_insert.py | 1 + .../1-insert/opentsdb_telnet_line_taosc_insert.py | 1 + tests/system-test/1-insert/table_comment.py | 1 + tests/system-test/1-insert/table_param_ttl.py | 1 + tests/system-test/1-insert/tb_100w_data_order.py | 1 + .../1-insert/test_stmt_muti_insert_query.py | 1 + tests/system-test/1-insert/test_stmt_set_tbname_tag.py | 1 + tests/system-test/1-insert/time_range_wise.py | 1 + tests/system-test/1-insert/update_data.py | 1 + tests/system-test/1-insert/update_data_muti_rows.py | 1 + tests/system-test/2-query/Now.py | 1 + tests/system-test/2-query/Timediff.py | 1 + tests/system-test/2-query/To_iso8601.py | 1 + tests/system-test/2-query/To_unixtimestamp.py | 1 + tests/system-test/2-query/Today.py | 1 + tests/system-test/2-query/abs.py | 10 ++++++---- tests/system-test/2-query/and_or_for_byte.py | 1 + tests/system-test/2-query/apercentile.py | 1 + tests/system-test/2-query/arccos.py | 1 + tests/system-test/2-query/arcsin.py | 1 + tests/system-test/2-query/arctan.py | 1 + tests/system-test/2-query/avg.py | 1 + tests/system-test/2-query/between.py | 1 + tests/system-test/2-query/bottom.py | 1 + tests/system-test/2-query/cast.py | 1 + tests/system-test/2-query/ceil.py | 1 + tests/system-test/2-query/char_length.py | 1 + tests/system-test/2-query/check_tsdb.py | 1 + tests/system-test/2-query/concat.py | 1 + tests/system-test/2-query/concat2.py | 1 + tests/system-test/2-query/concat_ws.py | 1 + tests/system-test/2-query/concat_ws2.py | 1 + tests/system-test/2-query/cos.py | 1 + tests/system-test/2-query/count.py | 1 + tests/system-test/2-query/count_partition.py | 1 + tests/system-test/2-query/csum.py | 1 + tests/system-test/2-query/db.py | 1 + tests/system-test/2-query/diff.py | 1 + tests/system-test/2-query/distinct.py | 1 + .../system-test/2-query/distribute_agg_apercentile.py | 1 + tests/system-test/2-query/distribute_agg_avg.py | 1 + tests/system-test/2-query/distribute_agg_count.py | 1 + tests/system-test/2-query/distribute_agg_max.py | 1 + tests/system-test/2-query/distribute_agg_min.py | 1 + tests/system-test/2-query/distribute_agg_spread.py | 1 + tests/system-test/2-query/distribute_agg_stddev.py | 1 + tests/system-test/2-query/distribute_agg_sum.py | 1 + tests/system-test/2-query/elapsed.py | 1 + tests/system-test/2-query/explain.py | 1 + tests/system-test/2-query/first.py | 1 + tests/system-test/2-query/floor.py | 1 + tests/system-test/2-query/function_diff.py | 1 + tests/system-test/2-query/function_null.py | 1 + tests/system-test/2-query/function_stateduration.py | 1 + tests/system-test/2-query/histogram.py | 1 + tests/system-test/2-query/hyperloglog.py | 1 + tests/system-test/2-query/interp.py | 1 + tests/system-test/2-query/irate.py | 1 + tests/system-test/2-query/join.py | 1 + tests/system-test/2-query/join2.py | 1 + tests/system-test/2-query/json_tag.py | 1 + tests/system-test/2-query/json_tag_large_tables.py | 1 + tests/system-test/2-query/last.py | 1 + tests/system-test/2-query/last_row.py | 1 + tests/system-test/2-query/leastsquares.py | 1 + tests/system-test/2-query/length.py | 1 + tests/system-test/2-query/log.py | 1 + tests/system-test/2-query/lower.py | 1 + tests/system-test/2-query/ltrim.py | 1 + tests/system-test/2-query/mavg.py | 1 + tests/system-test/2-query/max.py | 1 + tests/system-test/2-query/max_partition.py | 1 + tests/system-test/2-query/min.py | 1 + tests/system-test/2-query/nestedQuery.py | 1 + tests/system-test/2-query/percentile.py | 1 + tests/system-test/2-query/pow.py | 1 + tests/system-test/2-query/qnodeCluster.py | 1 + tests/system-test/2-query/queryQnode.py | 1 + tests/system-test/2-query/query_cols_tags_and_or.py | 1 + tests/system-test/2-query/round.py | 1 + tests/system-test/2-query/rtrim.py | 1 + tests/system-test/2-query/sample.py | 1 + tests/system-test/2-query/sin.py | 1 + tests/system-test/2-query/smaTest.py | 1 + tests/system-test/2-query/sml.py | 1 + tests/system-test/2-query/spread.py | 1 + tests/system-test/2-query/sqrt.py | 1 + tests/system-test/2-query/stablity.py | 1 + tests/system-test/2-query/statecount.py | 1 + tests/system-test/2-query/stateduration.py | 1 + tests/system-test/2-query/stddev.py | 1 + tests/system-test/2-query/substr.py | 1 + tests/system-test/2-query/sum.py | 1 + tests/system-test/2-query/tail.py | 1 + tests/system-test/2-query/tan.py | 1 + tests/system-test/2-query/timetruncate.py | 1 + tests/system-test/2-query/timezone.py | 1 + tests/system-test/2-query/top.py | 1 + tests/system-test/2-query/tsbsQuery.py | 1 + tests/system-test/2-query/ttl_comment.py | 1 + tests/system-test/2-query/twa.py | 1 + tests/system-test/2-query/union.py | 1 + tests/system-test/2-query/union1.py | 1 + tests/system-test/2-query/union2.py | 1 + tests/system-test/2-query/union3.py | 1 + tests/system-test/2-query/union4.py | 1 + tests/system-test/2-query/unique.py | 1 + tests/system-test/2-query/upper.py | 1 + tests/system-test/2-query/varchar.py | 1 + tests/system-test/5-taos-tools/TD-12478.py | 1 + .../5-taos-tools/taosdump/taosdumpTestColTag.py | 1 + tests/system-test/6-cluster/5dnode3mnodeDrop.py | 1 + .../vnode/4dnode1mnode_basic_createDb_replica1.py | 1 + .../vnode/4dnode1mnode_basic_replica1_insertdatas.py | 1 + .../4dnode1mnode_basic_replica1_insertdatas_querys.py | 1 + .../vnode/4dnode1mnode_basic_replica3_insertdatas.py | 1 + ...basic_replica3_insertdatas_force_stop_all_dnodes.py | 1 + .../4dnode1mnode_basic_replica3_insertdatas_querys.py | 1 + ...plica3_insertdatas_querys_loop_restart_all_vnode.py | 1 + ...eplica3_insertdatas_querys_loop_restart_follower.py | 1 + ..._replica3_insertdatas_querys_loop_restart_leader.py | 1 + ...mnode_basic_replica3_insertdatas_stop_all_dnodes.py | 1 + ...de_basic_replica3_insertdatas_stop_follower_sync.py | 1 + ..._basic_replica3_insertdatas_stop_follower_unsync.py | 1 + ...ica3_insertdatas_stop_follower_unsync_force_stop.py | 1 + ...ode1mnode_basic_replica3_insertdatas_stop_leader.py | 1 + ...sic_replica3_insertdatas_stop_leader_forece_stop.py | 1 + ...e1mnode_basic_replica3_mnode3_insertdatas_querys.py | 1 + ...de1mnode_basic_replica3_querydatas_stop_follower.py | 1 + ...sic_replica3_querydatas_stop_follower_force_stop.py | 1 + ...node1mnode_basic_replica3_querydatas_stop_leader.py | 1 + ...basic_replica3_querydatas_stop_leader_force_stop.py | 1 + .../vnode/4dnode1mnode_basic_replica3_vgroups.py | 1 + .../4dnode1mnode_basic_replica3_vgroups_stopOne.py | 1 + tests/system-test/7-tmq/basic5.py | 1 + tests/system-test/7-tmq/create_wrong_topic.py | 1 + tests/system-test/7-tmq/dataFromTsdbNWal-multiCtb.py | 1 + tests/system-test/7-tmq/dataFromTsdbNWal.py | 1 + tests/system-test/7-tmq/db.py | 1 + tests/system-test/7-tmq/dropDbR3ConflictTransaction.py | 1 + tests/system-test/7-tmq/schema.py | 1 + tests/system-test/7-tmq/stbFilter.py | 1 + tests/system-test/7-tmq/stbTagFilter-1ctb.py | 1 + tests/system-test/7-tmq/stbTagFilter-multiCtb.py | 1 + tests/system-test/7-tmq/subscribeDb.py | 1 + tests/system-test/7-tmq/subscribeDb0.py | 1 + tests/system-test/7-tmq/subscribeDb1.py | 1 + tests/system-test/7-tmq/subscribeDb2.py | 1 + tests/system-test/7-tmq/subscribeDb3.py | 1 + tests/system-test/7-tmq/subscribeDb4.py | 1 + tests/system-test/7-tmq/subscribeStb.py | 1 + tests/system-test/7-tmq/subscribeStb0.py | 1 + tests/system-test/7-tmq/subscribeStb1.py | 1 + tests/system-test/7-tmq/subscribeStb2.py | 1 + tests/system-test/7-tmq/subscribeStb3.py | 1 + tests/system-test/7-tmq/subscribeStb4.py | 1 + tests/system-test/7-tmq/tmq3mnodeSwitch.py | 1 + tests/system-test/7-tmq/tmqAlterSchema.py | 1 + tests/system-test/7-tmq/tmqAutoCreateTbl.py | 1 + tests/system-test/7-tmq/tmqCheckData.py | 1 + tests/system-test/7-tmq/tmqCheckData1.py | 1 + tests/system-test/7-tmq/tmqCommon.py | 1 + .../7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py | 1 + tests/system-test/7-tmq/tmqConsFromTsdb-1ctb.py | 1 + .../tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py | 1 + .../7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py | 1 + tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg.py | 1 + tests/system-test/7-tmq/tmqConsFromTsdb.py | 1 + .../7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py | 1 + tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb.py | 1 + .../tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py | 1 + .../7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py | 1 + tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py | 1 + tests/system-test/7-tmq/tmqConsFromTsdb1.py | 1 + tests/system-test/7-tmq/tmqConsumerGroup.py | 1 + tests/system-test/7-tmq/tmqDelete-1ctb.py | 1 + tests/system-test/7-tmq/tmqDelete-multiCtb.py | 1 + tests/system-test/7-tmq/tmqDnode.py | 1 + tests/system-test/7-tmq/tmqDnodeRestart.py | 1 + tests/system-test/7-tmq/tmqDropNtb-snapshot0.py | 1 + tests/system-test/7-tmq/tmqDropNtb-snapshot1.py | 1 + tests/system-test/7-tmq/tmqDropStb.py | 1 + tests/system-test/7-tmq/tmqDropStbCtb.py | 1 + tests/system-test/7-tmq/tmqError.py | 1 + tests/system-test/7-tmq/tmqModule.py | 1 + tests/system-test/7-tmq/tmqShow.py | 1 + tests/system-test/7-tmq/tmqSubscribeStb-r3.py | 1 + tests/system-test/7-tmq/tmqUdf-multCtb-snapshot0.py | 1 + tests/system-test/7-tmq/tmqUdf-multCtb-snapshot1.py | 1 + tests/system-test/7-tmq/tmqUdf.py | 1 + tests/system-test/7-tmq/tmqUpdate-1ctb.py | 1 + .../system-test/7-tmq/tmqUpdate-multiCtb-snapshot0.py | 1 + .../system-test/7-tmq/tmqUpdate-multiCtb-snapshot1.py | 1 + tests/system-test/7-tmq/tmqUpdate-multiCtb.py | 1 + tests/system-test/7-tmq/tmqUpdateWithConsume.py | 1 + tests/system-test/7-tmq/tmq_taosx.py | 1 + tests/system-test/99-TDcase/TD-15517.py | 1 + tests/system-test/99-TDcase/TD-15554.py | 1 + tests/system-test/99-TDcase/TD-15557.py | 1 + tests/system-test/99-TDcase/TD-15563.py | 1 + tests/system-test/99-TDcase/TD-16025.py | 1 + tests/system-test/99-TDcase/TD-16821.py | 1 + tests/system-test/99-TDcase/TD-17255.py | 1 + tests/system-test/99-TDcase/TD-17699.py | 1 + tests/system-test/99-TDcase/TD-19201.py | 1 + 268 files changed, 317 insertions(+), 48 deletions(-) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py index 23b6341e66..4e3c9d07ce 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py @@ -25,7 +25,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py b/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py index 4473ff2c2d..163cdd0055 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/custom_col_tag.py b/tests/develop-test/5-taos-tools/taosbenchmark/custom_col_tag.py index 4f8e94a887..0fb39c210c 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/custom_col_tag.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/custom_col_tag.py @@ -24,7 +24,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py index 95afdc413e..7599c82483 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py @@ -23,7 +23,8 @@ class TDTestCase: [TD-11510] taosBenchmark test cases """ - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/demo.py b/tests/develop-test/5-taos-tools/taosbenchmark/demo.py index 90d0ffd8b1..6be5117b08 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/demo.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/demo.py @@ -27,7 +27,8 @@ class TDTestCase: """ return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py index 7437b46353..e63908ce33 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py @@ -24,7 +24,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py b/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py index a706967bc1..73894d5e33 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py @@ -24,7 +24,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/json_tag.py b/tests/develop-test/5-taos-tools/taosbenchmark/json_tag.py index 3b9123974f..afefabef66 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/json_tag.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/json_tag.py @@ -24,7 +24,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/limit_offset_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/limit_offset_json.py index dbddb840ca..d95e6741f8 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/limit_offset_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/limit_offset_json.py @@ -24,7 +24,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py index 7f0b082e33..375113c3ef 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py @@ -29,7 +29,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/sample_csv_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/sample_csv_json.py index 5b59d84b79..fd79f1e01b 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/sample_csv_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/sample_csv_json.py @@ -24,7 +24,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/sml_interlace.py b/tests/develop-test/5-taos-tools/taosbenchmark/sml_interlace.py index ee7bb8a925..200a3c0e69 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/sml_interlace.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/sml_interlace.py @@ -24,7 +24,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py b/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py index d7ccdc2716..2c6d09b0f5 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py @@ -24,7 +24,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/sml_telnet_alltypes.py b/tests/develop-test/5-taos-tools/taosbenchmark/sml_telnet_alltypes.py index 7b0f5d1672..241c6d6359 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/sml_telnet_alltypes.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/sml_telnet_alltypes.py @@ -24,7 +24,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/taosadapter_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/taosadapter_json.py index 1588b4077c..4d0adde192 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/taosadapter_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/taosadapter_json.py @@ -25,7 +25,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/telnet_tcp.py b/tests/develop-test/5-taos-tools/taosbenchmark/telnet_tcp.py index b8d4c35e58..78cb49846e 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/telnet_tcp.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/telnet_tcp.py @@ -25,7 +25,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py index 09976953e1..a6c2062d6c 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -52,7 +53,7 @@ class TDTestCase: return paths[0] def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py index 7eaddd9e2d..d10734abd7 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -50,7 +51,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py index c70748e9c2..98a128b489 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -50,7 +51,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py index eb4b8a364a..1342295d7d 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -50,7 +51,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py index 70501965fe..f3de1c7628 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py @@ -28,7 +28,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -51,7 +52,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py index 5e551a373c..1133c1d1a5 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py @@ -28,7 +28,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -51,7 +52,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py index f2d4c4f814..933bc41bae 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -50,7 +51,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py index 5971902cb6..77dd3d3938 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -50,7 +51,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py index f2dca23488..5568c3679f 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -49,7 +50,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py index 6f2781d645..852aa17dc5 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -49,7 +50,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py index b226204654..ab61b48c8f 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -50,7 +51,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py index 766110d74e..ae895712c0 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -50,7 +51,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py index 242681b0fc..86bcfd92f2 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -50,7 +51,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py index d512cba97c..d67dfea408 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py @@ -27,7 +27,8 @@ class TDTestCase: ''' return - def init(self, conn, logSql, replicaVarl=1): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) self.tmpdir = "tmp" @@ -50,7 +51,7 @@ class TDTestCase: return buildPath def run(self): - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdSql.execute("drop database if exists db") tdSql.execute("create database db days 11 keep 3649 blocks 8 ") diff --git a/tests/system-test/0-others/cachemodel.py b/tests/system-test/0-others/cachemodel.py index 53834f792d..a8efd0d719 100644 --- a/tests/system-test/0-others/cachemodel.py +++ b/tests/system-test/0-others/cachemodel.py @@ -15,6 +15,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, replicaVar=1): + self.replicaVar = int(replicaVar) 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 88fbcd179d..619031fc29 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -23,6 +23,7 @@ class TDTestCase: return def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 fe470c442e..04a9f5c941 100644 --- a/tests/system-test/0-others/fsync.py +++ b/tests/system-test/0-others/fsync.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 6ce8872cda..b5d6a0d1a3 100644 --- a/tests/system-test/0-others/show.py +++ b/tests/system-test/0-others/show.py @@ -21,6 +21,7 @@ from util.sqlset import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 b9ea39fc84..4ddae42ac5 100644 --- a/tests/system-test/0-others/sysinfo.py +++ b/tests/system-test/0-others/sysinfo.py @@ -21,6 +21,7 @@ from util.common import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 accb49dbfb..e3095e8b93 100644 --- a/tests/system-test/0-others/taosShell.py +++ b/tests/system-test/0-others/taosShell.py @@ -109,6 +109,7 @@ class TDTestCase: print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 e8271387a8..5e6a590806 100644 --- a/tests/system-test/0-others/taosShellError.py +++ b/tests/system-test/0-others/taosShellError.py @@ -111,6 +111,7 @@ class TDTestCase: print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 72c06f71be..781fcae638 100644 --- a/tests/system-test/0-others/taosShellNetChk.py +++ b/tests/system-test/0-others/taosShellNetChk.py @@ -111,6 +111,7 @@ class TDTestCase: print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 a9907419e4..944ff52d5b 100644 --- a/tests/system-test/0-others/taosdMonitor.py +++ b/tests/system-test/0-others/taosdMonitor.py @@ -285,6 +285,7 @@ class TDTestCase: print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 83b4956c9b..f38efdb03c 100644 --- a/tests/system-test/0-others/taosdShell.py +++ b/tests/system-test/0-others/taosdShell.py @@ -45,6 +45,7 @@ class TDTestCase: # print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ba265abc2d..d4698960cd 100644 --- a/tests/system-test/0-others/taosdlog.py +++ b/tests/system-test/0-others/taosdlog.py @@ -11,6 +11,7 @@ from util.dnodes import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 021b9aed2c..bc5d276faa 100644 --- a/tests/system-test/0-others/telemetry.py +++ b/tests/system-test/0-others/telemetry.py @@ -174,6 +174,7 @@ class TDTestCase: print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 a58e22ba1c..1f6096dd5a 100644 --- a/tests/system-test/0-others/udfTest.py +++ b/tests/system-test/0-others/udfTest.py @@ -14,6 +14,7 @@ import subprocess class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 9b1874d576..35d43ea9b7 100644 --- a/tests/system-test/0-others/udf_cfg1.py +++ b/tests/system-test/0-others/udf_cfg1.py @@ -16,6 +16,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 ,"udf":0} def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 67848a9430..b49c99de34 100644 --- a/tests/system-test/0-others/udf_cfg2.py +++ b/tests/system-test/0-others/udf_cfg2.py @@ -16,6 +16,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 ,"udf":1} def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/0-others/udf_cluster.py b/tests/system-test/0-others/udf_cluster.py index a20bc128a2..90b6df16ff 100644 --- a/tests/system-test/0-others/udf_cluster.py +++ b/tests/system-test/0-others/udf_cluster.py @@ -20,6 +20,7 @@ class MyDnodes(TDDnodes): class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None self.depoly_cluster(3) diff --git a/tests/system-test/0-others/udf_create.py b/tests/system-test/0-others/udf_create.py index 736943cc56..9426e7eacb 100644 --- a/tests/system-test/0-others/udf_create.py +++ b/tests/system-test/0-others/udf_create.py @@ -16,6 +16,7 @@ import threading class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 02c59c21e1..f6134909b4 100644 --- a/tests/system-test/0-others/udf_restart_taosd.py +++ b/tests/system-test/0-others/udf_restart_taosd.py @@ -13,6 +13,7 @@ import subprocess class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 c6a1a7eac2..3918828646 100644 --- a/tests/system-test/0-others/user_control.py +++ b/tests/system-test/0-others/user_control.py @@ -155,6 +155,7 @@ class User: class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 6d9e04ec42..1918c0ef76 100644 --- a/tests/system-test/1-insert/alter_database.py +++ b/tests/system-test/1-insert/alter_database.py @@ -12,6 +12,7 @@ from util.dnodes import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 77ff6ae0f8..3e82b573b1 100644 --- a/tests/system-test/1-insert/alter_stable.py +++ b/tests/system-test/1-insert/alter_stable.py @@ -21,6 +21,7 @@ from util import constant from util.common import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 aed4089cfa..6a437d4601 100644 --- a/tests/system-test/1-insert/alter_table.py +++ b/tests/system-test/1-insert/alter_table.py @@ -22,6 +22,7 @@ from util.sqlset import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 bb35154746..0e17a01d05 100644 --- a/tests/system-test/1-insert/block_wise.py +++ b/tests/system-test/1-insert/block_wise.py @@ -143,6 +143,7 @@ class BSMAschema: class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d16e506b53..e673815c73 100644 --- a/tests/system-test/1-insert/create_retentions.py +++ b/tests/system-test/1-insert/create_retentions.py @@ -45,6 +45,7 @@ NTBNAME = "nt1" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), True) diff --git a/tests/system-test/1-insert/database_pre_suf.py b/tests/system-test/1-insert/database_pre_suf.py index c921619e56..862edbdde9 100755 --- a/tests/system-test/1-insert/database_pre_suf.py +++ b/tests/system-test/1-insert/database_pre_suf.py @@ -29,6 +29,7 @@ class TDTestCase: "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"fnDebugFlag":143} def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 fd0bd43b01..23bb539620 100644 --- a/tests/system-test/1-insert/db_tb_name_check.py +++ b/tests/system-test/1-insert/db_tb_name_check.py @@ -32,6 +32,7 @@ from util.common import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d935a08133..bcaebd6e3e 100644 --- a/tests/system-test/1-insert/delete_data.py +++ b/tests/system-test/1-insert/delete_data.py @@ -24,6 +24,7 @@ from util.sqlset import TDSetSql class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 82db318c2b..6372502484 100644 --- a/tests/system-test/1-insert/influxdb_line_taosc_insert.py +++ b/tests/system-test/1-insert/influxdb_line_taosc_insert.py @@ -30,6 +30,7 @@ if platform.system().lower() == 'windows': class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 9d033ff6e5..2356835ce8 100644 --- a/tests/system-test/1-insert/insertWithMoreVgroup.py +++ b/tests/system-test/1-insert/insertWithMoreVgroup.py @@ -63,6 +63,7 @@ class TDTestCase: # init def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d063501484..029d013d5b 100644 --- a/tests/system-test/1-insert/insert_drop.py +++ b/tests/system-test/1-insert/insert_drop.py @@ -9,6 +9,7 @@ import threading class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 00cbc771c5..0cb6d841ed 100644 --- a/tests/system-test/1-insert/keep_expired.py +++ b/tests/system-test/1-insert/keep_expired.py @@ -8,6 +8,7 @@ import time class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 08f0ba8313..3e2bec130e 100644 --- a/tests/system-test/1-insert/mutil_stage.py +++ b/tests/system-test/1-insert/mutil_stage.py @@ -58,6 +58,7 @@ DATA_PRE2 = f"data2" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 1f568fdea1..042d881658 100644 --- a/tests/system-test/1-insert/mutipythonnodebugtaosd.py +++ b/tests/system-test/1-insert/mutipythonnodebugtaosd.py @@ -61,6 +61,7 @@ class TDTestCase: # init def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 9be51eb445..44243fe029 100644 --- a/tests/system-test/1-insert/opentsdb_json_taosc_insert.py +++ b/tests/system-test/1-insert/opentsdb_json_taosc_insert.py @@ -25,6 +25,7 @@ import json class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ab11691cf8..f588827206 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 @@ -29,6 +29,7 @@ if platform.system().lower() == 'windows': class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 2a8aa9b26a..270e0ca424 100644 --- a/tests/system-test/1-insert/table_comment.py +++ b/tests/system-test/1-insert/table_comment.py @@ -21,6 +21,7 @@ from util.common import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 a184c51178..51d7d596cd 100644 --- a/tests/system-test/1-insert/table_param_ttl.py +++ b/tests/system-test/1-insert/table_param_ttl.py @@ -19,6 +19,7 @@ from util.common import * class TDTestCase: updatecfgDict = {'ttlUnit':5,'ttlPushInterval':3} def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 85fe559cc2..ec166f5f6c 100644 --- a/tests/system-test/1-insert/tb_100w_data_order.py +++ b/tests/system-test/1-insert/tb_100w_data_order.py @@ -6,6 +6,7 @@ from util.common import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 89beb30dc9..d75e04d2db 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 @@ -58,6 +58,7 @@ class TDTestCase: # init def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 535a65ffed..afd9d45b56 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 @@ -58,6 +58,7 @@ class TDTestCase: # init def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 1499c178d4..3d5c9197d1 100644 --- a/tests/system-test/1-insert/time_range_wise.py +++ b/tests/system-test/1-insert/time_range_wise.py @@ -135,6 +135,7 @@ class TDTestCase: updatecfgDict = {"querySmaOptimize": 1} def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d6b37db8b1..6fcd987ea4 100644 --- a/tests/system-test/1-insert/update_data.py +++ b/tests/system-test/1-insert/update_data.py @@ -21,6 +21,7 @@ from util.common import * from util.sqlset import TDSetSql class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 af78ba5d19..67406f327e 100644 --- a/tests/system-test/1-insert/update_data_muti_rows.py +++ b/tests/system-test/1-insert/update_data_muti_rows.py @@ -24,6 +24,7 @@ from util.common import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0e514cf43b..db97cdad64 100644 --- a/tests/system-test/2-query/Now.py +++ b/tests/system-test/2-query/Now.py @@ -8,6 +8,7 @@ from util.sqlset import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 c126ce926a..4e72c07b30 100644 --- a/tests/system-test/2-query/Timediff.py +++ b/tests/system-test/2-query/Timediff.py @@ -5,6 +5,7 @@ from util.gettime import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 bf4fe404aa..92aacbb350 100644 --- a/tests/system-test/2-query/To_iso8601.py +++ b/tests/system-test/2-query/To_iso8601.py @@ -11,6 +11,7 @@ import os class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 df99b08862..8ee2007450 100644 --- a/tests/system-test/2-query/To_unixtimestamp.py +++ b/tests/system-test/2-query/To_unixtimestamp.py @@ -11,6 +11,7 @@ from util.sqlset import TDSetSql class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0f89a378be..08f6ba6baf 100644 --- a/tests/system-test/2-query/Today.py +++ b/tests/system-test/2-query/Today.py @@ -11,6 +11,7 @@ import pandas as pd class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 6bc9457264..d7478a55a8 100644 --- a/tests/system-test/2-query/abs.py +++ b/tests/system-test/2-query/abs.py @@ -15,12 +15,14 @@ class TDTestCase: # "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "udfDebugFlag": 143} def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) self.tb_nums = 10 self.row_nums = 20 self.ts = 1434938400000 self.time_step = 1000 + self.replicaVar = int(replicaVar) def insert_datas_and_check_abs(self ,tbnums , rownums , time_step ): tdLog.info(" prepare datas for auto check abs function ") @@ -28,7 +30,7 @@ class TDTestCase: stbname = f"{dbname}.stb" ctbname_pre = f"{dbname}.sub_tb_" - tdSql.execute(f" create database {dbname} ") + tdSql.execute(f" create database {dbname} replica {self.replicaVar} ") tdSql.execute(f" use {dbname} ") tdSql.execute(f" create stable {stbname} (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint,\ c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) tags (t1 int)") @@ -125,7 +127,7 @@ class TDTestCase: def prepare_tag_datas(self, dbname="testdb"): # prepare datas tdSql.execute( - f"create database if not exists {dbname} keep 3650 duration 1000") + f"create database if not exists {dbname} keep 3650 duration 1000 replica {self.replicaVar} ") tdSql.execute(" use testdb ") tdSql.execute( f'''create table {dbname}.stb1 @@ -456,7 +458,7 @@ class TDTestCase: dbname = "bound_test" tdSql.execute(f"drop database if exists {dbname}") - tdSql.execute(f"create database if not exists {dbname}") + tdSql.execute(f"create database if not exists {dbname} replica {self.replicaVar} ") time.sleep(3) tdSql.execute(f"use {dbname}") tdSql.execute( @@ -589,7 +591,7 @@ class TDTestCase: def run(self): # sourcery skip: extract-duplicate-method, remove-redundant-fstring - tdSql.prepare() + tdSql.prepare(replica=f"{self.replicaVar}") tdLog.printNoPrefix("==========step1:create table ==============") 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 682d729f0e..479918f2f9 100644 --- a/tests/system-test/2-query/and_or_for_byte.py +++ b/tests/system-test/2-query/and_or_for_byte.py @@ -15,6 +15,7 @@ class TDTestCase: # "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "udfDebugFlag": 143} def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 8997238d7b..e190bf9374 100644 --- a/tests/system-test/2-query/apercentile.py +++ b/tests/system-test/2-query/apercentile.py @@ -19,6 +19,7 @@ from util.sqlset import TDSetSql class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(),False) self.rowNum = 10 diff --git a/tests/system-test/2-query/arccos.py b/tests/system-test/2-query/arccos.py index 69e42a3911..ed717741c5 100644 --- a/tests/system-test/2-query/arccos.py +++ b/tests/system-test/2-query/arccos.py @@ -13,6 +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, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/arcsin.py b/tests/system-test/2-query/arcsin.py index 57d08d0587..71de088979 100644 --- a/tests/system-test/2-query/arcsin.py +++ b/tests/system-test/2-query/arcsin.py @@ -13,6 +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, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/arctan.py b/tests/system-test/2-query/arctan.py index 64a29f7ccb..9780f9855b 100644 --- a/tests/system-test/2-query/arctan.py +++ b/tests/system-test/2-query/arctan.py @@ -13,6 +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, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/avg.py b/tests/system-test/2-query/avg.py index e7086744f8..ec7ec34ed3 100644 --- a/tests/system-test/2-query/avg.py +++ b/tests/system-test/2-query/avg.py @@ -11,6 +11,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, replicaVar=1): + self.replicaVar = int(replicaVar) 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 dd7dda668b..719852ff27 100644 --- a/tests/system-test/2-query/between.py +++ b/tests/system-test/2-query/between.py @@ -10,6 +10,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 4c352b619f..76052301d9 100644 --- a/tests/system-test/2-query/bottom.py +++ b/tests/system-test/2-query/bottom.py @@ -22,6 +22,7 @@ from util.sqlset import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 b5881221f4..b3969a9c45 100644 --- a/tests/system-test/2-query/cast.py +++ b/tests/system-test/2-query/cast.py @@ -13,6 +13,7 @@ from util.dnodes import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 221b571e8e..fffd484720 100644 --- a/tests/system-test/2-query/ceil.py +++ b/tests/system-test/2-query/ceil.py @@ -14,6 +14,7 @@ class TDTestCase: # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 e8546ca72e..e42e5e4f2c 100644 --- a/tests/system-test/2-query/char_length.py +++ b/tests/system-test/2-query/char_length.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [TS_COL] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0cbbc60171..b3ff259cc5 100644 --- a/tests/system-test/2-query/check_tsdb.py +++ b/tests/system-test/2-query/check_tsdb.py @@ -13,6 +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, replicaVar=1): + self.replicaVar = int(replicaVar) 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 dc05a17185..326f6940f6 100644 --- a/tests/system-test/2-query/concat.py +++ b/tests/system-test/2-query/concat.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 1316a3a228..a7e61444fe 100644 --- a/tests/system-test/2-query/concat2.py +++ b/tests/system-test/2-query/concat2.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 8443d41818..26731715c1 100644 --- a/tests/system-test/2-query/concat_ws.py +++ b/tests/system-test/2-query/concat_ws.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 38b93660e1..bf340826b6 100644 --- a/tests/system-test/2-query/concat_ws2.py +++ b/tests/system-test/2-query/concat_ws2.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/cos.py b/tests/system-test/2-query/cos.py index 2675c34266..d6bddc4e84 100644 --- a/tests/system-test/2-query/cos.py +++ b/tests/system-test/2-query/cos.py @@ -13,6 +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, replicaVar=1): + self.replicaVar = int(replicaVar) 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 6362974d0b..254a8792af 100644 --- a/tests/system-test/2-query/count.py +++ b/tests/system-test/2-query/count.py @@ -4,6 +4,7 @@ from util.cases import * from util.sqlset import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 4ab51c4efe..f59376a979 100644 --- a/tests/system-test/2-query/count_partition.py +++ b/tests/system-test/2-query/count_partition.py @@ -5,6 +5,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 fb828b85df..e933eb54cb 100644 --- a/tests/system-test/2-query/csum.py +++ b/tests/system-test/2-query/csum.py @@ -27,6 +27,7 @@ from util.dnodes import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 aea16dd162..7fe8b96157 100644 --- a/tests/system-test/2-query/db.py +++ b/tests/system-test/2-query/db.py @@ -12,6 +12,7 @@ import random class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 74dae9d0fd..d48a01db6a 100644 --- a/tests/system-test/2-query/diff.py +++ b/tests/system-test/2-query/diff.py @@ -7,6 +7,7 @@ import numpy as np class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 c7c6e1c9b0..5c07544d5d 100644 --- a/tests/system-test/2-query/distinct.py +++ b/tests/system-test/2-query/distinct.py @@ -10,6 +10,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d2364df65a..897580fbcc 100644 --- a/tests/system-test/2-query/distribute_agg_apercentile.py +++ b/tests/system-test/2-query/distribute_agg_apercentile.py @@ -9,6 +9,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 4b5d3d8c5a..1cd24103f8 100644 --- a/tests/system-test/2-query/distribute_agg_avg.py +++ b/tests/system-test/2-query/distribute_agg_avg.py @@ -10,6 +10,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 e6cf718c05..7d131cd77d 100644 --- a/tests/system-test/2-query/distribute_agg_count.py +++ b/tests/system-test/2-query/distribute_agg_count.py @@ -9,6 +9,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 92188bd765..fb91216c3e 100644 --- a/tests/system-test/2-query/distribute_agg_max.py +++ b/tests/system-test/2-query/distribute_agg_max.py @@ -10,6 +10,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 afc42755b3..2667798640 100644 --- a/tests/system-test/2-query/distribute_agg_min.py +++ b/tests/system-test/2-query/distribute_agg_min.py @@ -10,6 +10,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ab073c76a2..0247a91861 100644 --- a/tests/system-test/2-query/distribute_agg_spread.py +++ b/tests/system-test/2-query/distribute_agg_spread.py @@ -9,6 +9,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ae9479dcdd..80bab3082d 100644 --- a/tests/system-test/2-query/distribute_agg_stddev.py +++ b/tests/system-test/2-query/distribute_agg_stddev.py @@ -10,6 +10,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 59804b7dc5..da26fd58f9 100644 --- a/tests/system-test/2-query/distribute_agg_sum.py +++ b/tests/system-test/2-query/distribute_agg_sum.py @@ -10,6 +10,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d31df49a8e..dc89cd513d 100644 --- a/tests/system-test/2-query/elapsed.py +++ b/tests/system-test/2-query/elapsed.py @@ -21,6 +21,7 @@ from util.dnodes import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 1126e23f06..f164d3aedf 100644 --- a/tests/system-test/2-query/explain.py +++ b/tests/system-test/2-query/explain.py @@ -31,6 +31,7 @@ DBNAME = "db" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 9523527076..5b5b596a57 100644 --- a/tests/system-test/2-query/first.py +++ b/tests/system-test/2-query/first.py @@ -24,6 +24,7 @@ import numpy as np class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 65974ff2e9..6a75872bcf 100644 --- a/tests/system-test/2-query/floor.py +++ b/tests/system-test/2-query/floor.py @@ -13,6 +13,7 @@ DBNAME = "db" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 7f11b12e89..4abef03037 100644 --- a/tests/system-test/2-query/function_diff.py +++ b/tests/system-test/2-query/function_diff.py @@ -27,6 +27,7 @@ from util.dnodes import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 3a74ca268f..44b86ee543 100644 --- a/tests/system-test/2-query/function_null.py +++ b/tests/system-test/2-query/function_null.py @@ -12,6 +12,7 @@ import random class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 8f25595713..ad9b8b0d79 100644 --- a/tests/system-test/2-query/function_stateduration.py +++ b/tests/system-test/2-query/function_stateduration.py @@ -6,6 +6,7 @@ DBNAME = "db" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ecbb7fe927..cc6e8fe7e9 100644 --- a/tests/system-test/2-query/histogram.py +++ b/tests/system-test/2-query/histogram.py @@ -145,6 +145,7 @@ class Hsgschema: class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/hyperloglog.py b/tests/system-test/2-query/hyperloglog.py index eff687cba7..d2cbe07b65 100644 --- a/tests/system-test/2-query/hyperloglog.py +++ b/tests/system-test/2-query/hyperloglog.py @@ -32,6 +32,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 780565c778..ce6b85c1cf 100644 --- a/tests/system-test/2-query/interp.py +++ b/tests/system-test/2-query/interp.py @@ -10,6 +10,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 7b3ec10a8d..cee595d186 100644 --- a/tests/system-test/2-query/irate.py +++ b/tests/system-test/2-query/irate.py @@ -12,6 +12,7 @@ import random ,math class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 04b4fa89a2..120cc2eb30 100644 --- a/tests/system-test/2-query/join.py +++ b/tests/system-test/2-query/join.py @@ -64,6 +64,7 @@ class DataSet: class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 79cc62e4bc..7ddc5e57ba 100644 --- a/tests/system-test/2-query/join2.py +++ b/tests/system-test/2-query/join2.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 c6f1e5076d..1c2a6055bc 100644 --- a/tests/system-test/2-query/json_tag.py +++ b/tests/system-test/2-query/json_tag.py @@ -14,6 +14,7 @@ class TDTestCase: return def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 06170e0adf..ea3963640a 100644 --- a/tests/system-test/2-query/json_tag_large_tables.py +++ b/tests/system-test/2-query/json_tag_large_tables.py @@ -31,6 +31,7 @@ class TDTestCase: return def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0561dc9695..f4a1ab1790 100644 --- a/tests/system-test/2-query/last.py +++ b/tests/system-test/2-query/last.py @@ -9,6 +9,7 @@ import numpy as np class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 333c1516b3..f8d6ce4c6c 100644 --- a/tests/system-test/2-query/last_row.py +++ b/tests/system-test/2-query/last_row.py @@ -12,6 +12,7 @@ import random class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 8870e416f8..8ece4c46f0 100644 --- a/tests/system-test/2-query/leastsquares.py +++ b/tests/system-test/2-query/leastsquares.py @@ -30,6 +30,7 @@ DBNAME = "db" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 44c951dd4a..161ee20a9a 100644 --- a/tests/system-test/2-query/length.py +++ b/tests/system-test/2-query/length.py @@ -24,6 +24,7 @@ DBNAME = "db" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 11a0a9c317..7305a44f56 100644 --- a/tests/system-test/2-query/log.py +++ b/tests/system-test/2-query/log.py @@ -12,6 +12,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 f8ac1ab217..4499047a04 100644 --- a/tests/system-test/2-query/lower.py +++ b/tests/system-test/2-query/lower.py @@ -23,6 +23,7 @@ TS_TYPE_COL = [TS_COL] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ba769ba350..193aa45198 100644 --- a/tests/system-test/2-query/ltrim.py +++ b/tests/system-test/2-query/ltrim.py @@ -28,6 +28,7 @@ DBNAME = "db" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 7f545f2048..ec4a087a8e 100644 --- a/tests/system-test/2-query/mavg.py +++ b/tests/system-test/2-query/mavg.py @@ -28,6 +28,7 @@ from util.dnodes import * dbname = 'db' class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ee75afb501..b8da02b9a6 100644 --- a/tests/system-test/2-query/max.py +++ b/tests/system-test/2-query/max.py @@ -7,6 +7,7 @@ import numpy as np class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 f50b9fb2bb..a9b7a14eb0 100644 --- a/tests/system-test/2-query/max_partition.py +++ b/tests/system-test/2-query/max_partition.py @@ -5,6 +5,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 8849b14a33..bf9993da64 100644 --- a/tests/system-test/2-query/min.py +++ b/tests/system-test/2-query/min.py @@ -7,6 +7,7 @@ import numpy as np class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 4fbd840efe..b1008efa86 100755 --- a/tests/system-test/2-query/nestedQuery.py +++ b/tests/system-test/2-query/nestedQuery.py @@ -29,6 +29,7 @@ class TDTestCase: "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"fnDebugFlag":143} def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 58660eec6a..935f55a8c2 100644 --- a/tests/system-test/2-query/percentile.py +++ b/tests/system-test/2-query/percentile.py @@ -22,6 +22,7 @@ from util.sqlset import TDSetSql class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/pow.py b/tests/system-test/2-query/pow.py index f803da6176..a067d66547 100644 --- a/tests/system-test/2-query/pow.py +++ b/tests/system-test/2-query/pow.py @@ -11,6 +11,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/qnodeCluster.py b/tests/system-test/2-query/qnodeCluster.py index 6f3856146d..d15ef89eb8 100644 --- a/tests/system-test/2-query/qnodeCluster.py +++ b/tests/system-test/2-query/qnodeCluster.py @@ -27,6 +27,7 @@ class TDTestCase: updatecfgDict["clientCfg"] = clientCfgDict def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), False) diff --git a/tests/system-test/2-query/queryQnode.py b/tests/system-test/2-query/queryQnode.py index e3f4732c08..fec553436c 100644 --- a/tests/system-test/2-query/queryQnode.py +++ b/tests/system-test/2-query/queryQnode.py @@ -65,6 +65,7 @@ class TDTestCase: # init def init(self, conn, logSql=True, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) # tdSql.prepare() diff --git a/tests/system-test/2-query/query_cols_tags_and_or.py b/tests/system-test/2-query/query_cols_tags_and_or.py index 9fc016cb40..b8d4e3c314 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 @@ -17,6 +17,7 @@ from util.common import tdCom import random class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) ## 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 8f969a71d7..e3d98d6986 100644 --- a/tests/system-test/2-query/round.py +++ b/tests/system-test/2-query/round.py @@ -10,6 +10,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 e4835fbd8e..effb596e1d 100644 --- a/tests/system-test/2-query/rtrim.py +++ b/tests/system-test/2-query/rtrim.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d1890d8623..a09d6a2b85 100644 --- a/tests/system-test/2-query/sample.py +++ b/tests/system-test/2-query/sample.py @@ -25,6 +25,7 @@ DBNAME = "db" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor()) self.ts = 1537146000000 diff --git a/tests/system-test/2-query/sin.py b/tests/system-test/2-query/sin.py index 46b1ac50ae..4fdec8fd73 100644 --- a/tests/system-test/2-query/sin.py +++ b/tests/system-test/2-query/sin.py @@ -11,6 +11,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/smaTest.py b/tests/system-test/2-query/smaTest.py index 20ed103f8e..0390bae114 100644 --- a/tests/system-test/2-query/smaTest.py +++ b/tests/system-test/2-query/smaTest.py @@ -32,6 +32,7 @@ class TDTestCase: # init def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 64fe92438c..676bc0c127 100644 --- a/tests/system-test/2-query/sml.py +++ b/tests/system-test/2-query/sml.py @@ -16,6 +16,7 @@ from tmqCommon import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 79881d7293..61fe6793f9 100644 --- a/tests/system-test/2-query/spread.py +++ b/tests/system-test/2-query/spread.py @@ -31,6 +31,7 @@ DBNAME = "db" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/sqrt.py b/tests/system-test/2-query/sqrt.py index 4784b71fc6..9229444f74 100644 --- a/tests/system-test/2-query/sqrt.py +++ b/tests/system-test/2-query/sqrt.py @@ -11,6 +11,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 3c8d18e9e6..569bee62ec 100755 --- a/tests/system-test/2-query/stablity.py +++ b/tests/system-test/2-query/stablity.py @@ -29,6 +29,7 @@ class TDTestCase: "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"fnDebugFlag":143} def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 1d9a04cc73..2aa9194d37 100644 --- a/tests/system-test/2-query/statecount.py +++ b/tests/system-test/2-query/statecount.py @@ -13,6 +13,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 009ec37764..9c37dc68e7 100644 --- a/tests/system-test/2-query/stateduration.py +++ b/tests/system-test/2-query/stateduration.py @@ -18,6 +18,7 @@ from util.sql import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d044fb0dd7..1a2118a966 100644 --- a/tests/system-test/2-query/stddev.py +++ b/tests/system-test/2-query/stddev.py @@ -21,6 +21,7 @@ from util.common import * from util.sqlset import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 9b317aeab6..302711b13d 100644 --- a/tests/system-test/2-query/substr.py +++ b/tests/system-test/2-query/substr.py @@ -30,6 +30,7 @@ LENS = 6 class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ec1f60a720..27096fe5ad 100644 --- a/tests/system-test/2-query/sum.py +++ b/tests/system-test/2-query/sum.py @@ -25,6 +25,7 @@ DBNAME = "db" class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 3d5ecfaa9a..f925380c09 100644 --- a/tests/system-test/2-query/tail.py +++ b/tests/system-test/2-query/tail.py @@ -12,6 +12,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) diff --git a/tests/system-test/2-query/tan.py b/tests/system-test/2-query/tan.py index 203f149712..27e6efb475 100644 --- a/tests/system-test/2-query/tan.py +++ b/tests/system-test/2-query/tan.py @@ -11,6 +11,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 917b98daa9..32d6ef98e9 100644 --- a/tests/system-test/2-query/timetruncate.py +++ b/tests/system-test/2-query/timetruncate.py @@ -8,6 +8,7 @@ from datetime import datetime from util.gettime import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0a2da114de..316e776cb1 100644 --- a/tests/system-test/2-query/timezone.py +++ b/tests/system-test/2-query/timezone.py @@ -12,6 +12,7 @@ if platform.system().lower() == 'windows': class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 1cba18c2e2..d85e4dc768 100644 --- a/tests/system-test/2-query/top.py +++ b/tests/system-test/2-query/top.py @@ -20,6 +20,7 @@ from util.sqlset import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 c4604799a1..106d43ea38 100644 --- a/tests/system-test/2-query/tsbsQuery.py +++ b/tests/system-test/2-query/tsbsQuery.py @@ -21,6 +21,7 @@ class TDTestCase: updatecfgDict["clientCfg"] = clientCfgDict def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 fabd641da7..3ae602fa23 100644 --- a/tests/system-test/2-query/ttl_comment.py +++ b/tests/system-test/2-query/ttl_comment.py @@ -25,6 +25,7 @@ class TDTestCase: return def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 1fd3b8fdda..16b9779fa8 100644 --- a/tests/system-test/2-query/twa.py +++ b/tests/system-test/2-query/twa.py @@ -10,6 +10,7 @@ class TDTestCase: updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 737817f262..82dcfe12e6 100644 --- a/tests/system-test/2-query/union.py +++ b/tests/system-test/2-query/union.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 1ca25e7844..8db5ce01f3 100644 --- a/tests/system-test/2-query/union1.py +++ b/tests/system-test/2-query/union1.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 c063b5c383..b30d699482 100644 --- a/tests/system-test/2-query/union2.py +++ b/tests/system-test/2-query/union2.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 3322f30359..7e2bdf6143 100644 --- a/tests/system-test/2-query/union3.py +++ b/tests/system-test/2-query/union3.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 2da83d8190..efb5b71c4d 100644 --- a/tests/system-test/2-query/union4.py +++ b/tests/system-test/2-query/union4.py @@ -27,6 +27,7 @@ TS_TYPE_COL = [ TS_COL, ] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 b954fd004b..6c51854b43 100644 --- a/tests/system-test/2-query/unique.py +++ b/tests/system-test/2-query/unique.py @@ -13,6 +13,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 cc5347774c..e28483dc56 100644 --- a/tests/system-test/2-query/upper.py +++ b/tests/system-test/2-query/upper.py @@ -23,6 +23,7 @@ TS_TYPE_COL = [TS_COL] class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 3d5f443b3c..f0849010c6 100644 --- a/tests/system-test/2-query/varchar.py +++ b/tests/system-test/2-query/varchar.py @@ -10,6 +10,7 @@ from util.cases import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 576e59f339..66f960338e 100644 --- a/tests/system-test/5-taos-tools/TD-12478.py +++ b/tests/system-test/5-taos-tools/TD-12478.py @@ -37,6 +37,7 @@ class TDTestCase: return def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 8cb58b8d70..cbc9e83ba8 100644 --- a/tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py +++ b/tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py @@ -29,6 +29,7 @@ class TDTestCase: return def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug("start to execute %s" % __file__) tdSql.init(conn.cursor(), logSql) diff --git a/tests/system-test/6-cluster/5dnode3mnodeDrop.py b/tests/system-test/6-cluster/5dnode3mnodeDrop.py index 52f734b534..73c19b8cea 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeDrop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeDrop.py @@ -25,6 +25,7 @@ class TDTestCase: def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") self.TDDnodes = None + self.replicaVar = int(replicaVar) def buildcluster(self,dnodenumber): self.depoly_cluster(dnodenumber) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py index 435701bd8f..9bdc0a2cf4 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py @@ -19,6 +19,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py index f0d5e8328a..d33a1b0d27 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py @@ -19,6 +19,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py index 8d0801500e..75e01977fd 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py @@ -19,6 +19,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py index 379615d358..77dcab90bf 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py @@ -19,6 +19,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py index 240169dbb6..1a2c31a311 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py @@ -22,6 +22,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py index 25b5de5afa..a9fb9555e8 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py @@ -19,6 +19,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py index ab5359601a..2eb631d433 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py @@ -19,6 +19,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py index 4eec3c348d..6102a82b04 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py @@ -19,6 +19,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py index 0fe18ab705..d87ec3d35e 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py @@ -19,6 +19,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py index 75a7ca51b6..fc6d3c0683 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py @@ -22,6 +22,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py index e9c63151f3..00b808b8b4 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py @@ -22,6 +22,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py index 5dd57542b3..e64649189d 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py @@ -22,6 +22,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py index fd00e89216..b633887009 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py @@ -22,6 +22,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py index f98e2c07b5..6415da94b4 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py @@ -20,6 +20,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py index 5be2b67c31..1b99c1e92b 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py @@ -20,6 +20,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py index e8fa3099e9..ea5c4679a9 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py @@ -19,6 +19,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py index 21d0c2d2b8..1dcaae452e 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py @@ -22,6 +22,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py index ff6ce98c81..945fcf2990 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py @@ -22,6 +22,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py index e36f488c2b..6b87bee5a3 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py @@ -22,6 +22,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py index 050b98024d..8ef151a385 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py @@ -22,6 +22,7 @@ sys.path.append(os.path.dirname(__file__)) class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py index d086743306..49e5cafe96 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py @@ -18,6 +18,7 @@ import subprocess class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py index b9d3afa765..20cf7c583a 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py @@ -20,6 +20,7 @@ import subprocess class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) self.host = socket.gethostname() diff --git a/tests/system-test/7-tmq/basic5.py b/tests/system-test/7-tmq/basic5.py index d1985c6567..7d42a3e81f 100644 --- a/tests/system-test/7-tmq/basic5.py +++ b/tests/system-test/7-tmq/basic5.py @@ -27,6 +27,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 dbdcedcbe8..39d519fec1 100644 --- a/tests/system-test/7-tmq/create_wrong_topic.py +++ b/tests/system-test/7-tmq/create_wrong_topic.py @@ -14,6 +14,7 @@ from util.sqlset import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 484969010c..808a4935e3 100644 --- a/tests/system-test/7-tmq/dataFromTsdbNWal-multiCtb.py +++ b/tests/system-test/7-tmq/dataFromTsdbNWal-multiCtb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ed22df2b07..8386c22cd0 100644 --- a/tests/system-test/7-tmq/dataFromTsdbNWal.py +++ b/tests/system-test/7-tmq/dataFromTsdbNWal.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 10000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 17668d8d03..04f5aac559 100644 --- a/tests/system-test/7-tmq/db.py +++ b/tests/system-test/7-tmq/db.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 af6c51d947..4371a909c2 100644 --- a/tests/system-test/7-tmq/dropDbR3ConflictTransaction.py +++ b/tests/system-test/7-tmq/dropDbR3ConflictTransaction.py @@ -27,6 +27,7 @@ class TDTestCase: self.rowsPerTbl = 2 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 2a67cd1bc1..04224fbc7e 100644 --- a/tests/system-test/7-tmq/schema.py +++ b/tests/system-test/7-tmq/schema.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0f0e7c5287..6b48a6d570 100644 --- a/tests/system-test/7-tmq/stbFilter.py +++ b/tests/system-test/7-tmq/stbFilter.py @@ -16,6 +16,7 @@ from tmqCommon import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0ef454f3e2..c4a7c8cae5 100644 --- a/tests/system-test/7-tmq/stbTagFilter-1ctb.py +++ b/tests/system-test/7-tmq/stbTagFilter-1ctb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 10000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0ec114d3bd..c380d201b2 100644 --- a/tests/system-test/7-tmq/stbTagFilter-multiCtb.py +++ b/tests/system-test/7-tmq/stbTagFilter-multiCtb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 3790bd1690..fd06eedefd 100644 --- a/tests/system-test/7-tmq/subscribeDb.py +++ b/tests/system-test/7-tmq/subscribeDb.py @@ -21,6 +21,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 81d824156d..d4c5e2f87f 100644 --- a/tests/system-test/7-tmq/subscribeDb0.py +++ b/tests/system-test/7-tmq/subscribeDb0.py @@ -21,6 +21,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 02e72d0475..ea78c90abd 100644 --- a/tests/system-test/7-tmq/subscribeDb1.py +++ b/tests/system-test/7-tmq/subscribeDb1.py @@ -21,6 +21,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 edf1a8ec80..d045842e45 100644 --- a/tests/system-test/7-tmq/subscribeDb2.py +++ b/tests/system-test/7-tmq/subscribeDb2.py @@ -22,6 +22,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 34df61dc09..819588badc 100644 --- a/tests/system-test/7-tmq/subscribeDb3.py +++ b/tests/system-test/7-tmq/subscribeDb3.py @@ -21,6 +21,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 27efbee016..7f5169361c 100644 --- a/tests/system-test/7-tmq/subscribeDb4.py +++ b/tests/system-test/7-tmq/subscribeDb4.py @@ -52,6 +52,7 @@ class TDTestCase: hostname = socket.gethostname() def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 213f9aa89c..3ff0b25ff6 100644 --- a/tests/system-test/7-tmq/subscribeStb.py +++ b/tests/system-test/7-tmq/subscribeStb.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0c188754b2..1463cad627 100644 --- a/tests/system-test/7-tmq/subscribeStb0.py +++ b/tests/system-test/7-tmq/subscribeStb0.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 4d5407e927..edbe1bc3c6 100644 --- a/tests/system-test/7-tmq/subscribeStb1.py +++ b/tests/system-test/7-tmq/subscribeStb1.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 bb38a981d3..6c3e122902 100644 --- a/tests/system-test/7-tmq/subscribeStb2.py +++ b/tests/system-test/7-tmq/subscribeStb2.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 32272491c6..025f403282 100644 --- a/tests/system-test/7-tmq/subscribeStb3.py +++ b/tests/system-test/7-tmq/subscribeStb3.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 e347d27ac1..6aa3da66a4 100644 --- a/tests/system-test/7-tmq/subscribeStb4.py +++ b/tests/system-test/7-tmq/subscribeStb4.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 837317e5d7..a6bf01aa06 100644 --- a/tests/system-test/7-tmq/tmq3mnodeSwitch.py +++ b/tests/system-test/7-tmq/tmq3mnodeSwitch.py @@ -33,6 +33,7 @@ class TDTestCase: self.dnodeOfLeader = 0 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 3bff0e4754..a70678219f 100644 --- a/tests/system-test/7-tmq/tmqAlterSchema.py +++ b/tests/system-test/7-tmq/tmqAlterSchema.py @@ -33,6 +33,7 @@ class TDTestCase: self.dnodeOfLeader = 0 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 568e49388b..41073d83ae 100644 --- a/tests/system-test/7-tmq/tmqAutoCreateTbl.py +++ b/tests/system-test/7-tmq/tmqAutoCreateTbl.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 9995af15c2..04d0744ab5 100644 --- a/tests/system-test/7-tmq/tmqCheckData.py +++ b/tests/system-test/7-tmq/tmqCheckData.py @@ -16,6 +16,7 @@ from tmqCommon import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 5b055cf725..b9dac62833 100644 --- a/tests/system-test/7-tmq/tmqCheckData1.py +++ b/tests/system-test/7-tmq/tmqCheckData1.py @@ -16,6 +16,7 @@ from tmqCommon import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 e71e4d257d..c153e94caa 100644 --- a/tests/system-test/7-tmq/tmqCommon.py +++ b/tests/system-test/7-tmq/tmqCommon.py @@ -38,6 +38,7 @@ from util.common import * class TMQCom: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 655097c924..f372a2b742 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 100000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 709464fc1e..c7f95f6f41 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb-1ctb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 100000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 09ad6e38c9..26dacf514d 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 150 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 95e060d581..d6f100041b 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 70 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 fc3437613b..9bfc01529f 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 10000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 73af4d196f..975f89cbd7 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 10000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 20db44ef19..6a03f0f751 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 bd42f74c03..009862137f 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-1ctb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 100000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 2eb1a7c52a..95ce03e653 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 150 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 351a10ed1f..8ff01444f8 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 70 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 6504274993..528b3a8088 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1-mutilVg.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 10000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 2cfb6581d8..c0c459d315 100644 --- a/tests/system-test/7-tmq/tmqConsFromTsdb1.py +++ b/tests/system-test/7-tmq/tmqConsFromTsdb1.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 10000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 5c7d21069b..02093a2d88 100644 --- a/tests/system-test/7-tmq/tmqConsumerGroup.py +++ b/tests/system-test/7-tmq/tmqConsumerGroup.py @@ -16,6 +16,7 @@ from tmqCommon import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 7509e43af7..4b45b1a834 100644 --- a/tests/system-test/7-tmq/tmqDelete-1ctb.py +++ b/tests/system-test/7-tmq/tmqDelete-1ctb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 10000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ded6fe94d7..3b72b4aea5 100644 --- a/tests/system-test/7-tmq/tmqDelete-multiCtb.py +++ b/tests/system-test/7-tmq/tmqDelete-multiCtb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 921e543e2d..e1d6d91e2d 100644 --- a/tests/system-test/7-tmq/tmqDnode.py +++ b/tests/system-test/7-tmq/tmqDnode.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 205f513351..a44ff916e5 100644 --- a/tests/system-test/7-tmq/tmqDnodeRestart.py +++ b/tests/system-test/7-tmq/tmqDnodeRestart.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0d75df58f9..6c49fae299 100644 --- a/tests/system-test/7-tmq/tmqDropNtb-snapshot0.py +++ b/tests/system-test/7-tmq/tmqDropNtb-snapshot0.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 10 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 79cb79a83c..3fc5a2fdc7 100644 --- a/tests/system-test/7-tmq/tmqDropNtb-snapshot1.py +++ b/tests/system-test/7-tmq/tmqDropNtb-snapshot1.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 10 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 7679f0ca44..3789632984 100644 --- a/tests/system-test/7-tmq/tmqDropStb.py +++ b/tests/system-test/7-tmq/tmqDropStb.py @@ -52,6 +52,7 @@ class TDTestCase: hostname = socket.gethostname() def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 95780538d1..c9e34136cc 100644 --- a/tests/system-test/7-tmq/tmqDropStbCtb.py +++ b/tests/system-test/7-tmq/tmqDropStbCtb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 7ee9e5d169..7263f8553e 100644 --- a/tests/system-test/7-tmq/tmqError.py +++ b/tests/system-test/7-tmq/tmqError.py @@ -30,6 +30,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0063edce56..d6b4aff938 100644 --- a/tests/system-test/7-tmq/tmqModule.py +++ b/tests/system-test/7-tmq/tmqModule.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d0b46bf572..0c7403c615 100644 --- a/tests/system-test/7-tmq/tmqShow.py +++ b/tests/system-test/7-tmq/tmqShow.py @@ -16,6 +16,7 @@ from tmqCommon import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 33b8268a88..b3b3c4240f 100644 --- a/tests/system-test/7-tmq/tmqSubscribeStb-r3.py +++ b/tests/system-test/7-tmq/tmqSubscribeStb-r3.py @@ -28,6 +28,7 @@ class TDTestCase: self.rowsPerTbl = 100 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 8158249fa6..297429b495 100644 --- a/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot0.py +++ b/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot0.py @@ -24,6 +24,7 @@ class TDTestCase: self.rowsPerTbl = 1000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 97e50cf654..9c139b50de 100644 --- a/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot1.py +++ b/tests/system-test/7-tmq/tmqUdf-multCtb-snapshot1.py @@ -24,6 +24,7 @@ class TDTestCase: self.rowsPerTbl = 1000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d081423142..8593fd4f1e 100644 --- a/tests/system-test/7-tmq/tmqUdf.py +++ b/tests/system-test/7-tmq/tmqUdf.py @@ -24,6 +24,7 @@ class TDTestCase: self.rowsPerTbl = 1000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 a95920b7c4..b974e4a41a 100644 --- a/tests/system-test/7-tmq/tmqUpdate-1ctb.py +++ b/tests/system-test/7-tmq/tmqUpdate-1ctb.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 10000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0ced8fc34b..d5df88cf43 100644 --- a/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot0.py +++ b/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot0.py @@ -23,6 +23,7 @@ class TDTestCase: self.autoCtbPrefix = 'aCtb' def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 bdcbb9578e..6b8c10de27 100644 --- a/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot1.py +++ b/tests/system-test/7-tmq/tmqUpdate-multiCtb-snapshot1.py @@ -23,6 +23,7 @@ class TDTestCase: self.autoCtbPrefix = 'aCtb' def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 df150130c0..3975013e74 100644 --- a/tests/system-test/7-tmq/tmqUpdate-multiCtb.py +++ b/tests/system-test/7-tmq/tmqUpdate-multiCtb.py @@ -23,6 +23,7 @@ class TDTestCase: self.autoCtbPrefix = 'aCtb' def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 dbeac427ac..49a475ff16 100644 --- a/tests/system-test/7-tmq/tmqUpdateWithConsume.py +++ b/tests/system-test/7-tmq/tmqUpdateWithConsume.py @@ -22,6 +22,7 @@ class TDTestCase: self.rowsPerTbl = 1000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 fd7e1b7bb1..f2fbd84865 100644 --- a/tests/system-test/7-tmq/tmq_taosx.py +++ b/tests/system-test/7-tmq/tmq_taosx.py @@ -16,6 +16,7 @@ from tmqCommon import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 e45a54c272..db06700284 100644 --- a/tests/system-test/99-TDcase/TD-15517.py +++ b/tests/system-test/99-TDcase/TD-15517.py @@ -21,6 +21,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 02654b5703..51934ccd44 100644 --- a/tests/system-test/99-TDcase/TD-15554.py +++ b/tests/system-test/99-TDcase/TD-15554.py @@ -20,6 +20,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 ca29e1282f..884c028a65 100644 --- a/tests/system-test/99-TDcase/TD-15557.py +++ b/tests/system-test/99-TDcase/TD-15557.py @@ -21,6 +21,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 6b37f25bb6..5ea652b4fb 100644 --- a/tests/system-test/99-TDcase/TD-15563.py +++ b/tests/system-test/99-TDcase/TD-15563.py @@ -21,6 +21,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0adc313429..8c9fa9319f 100644 --- a/tests/system-test/99-TDcase/TD-16025.py +++ b/tests/system-test/99-TDcase/TD-16025.py @@ -28,6 +28,7 @@ class TDTestCase: #print ("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 b2b5e3f425..f57fae752f 100644 --- a/tests/system-test/99-TDcase/TD-16821.py +++ b/tests/system-test/99-TDcase/TD-16821.py @@ -16,6 +16,7 @@ from tmqCommon import * class TDTestCase: def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 bcf02b654f..0f83468754 100644 --- a/tests/system-test/99-TDcase/TD-17255.py +++ b/tests/system-test/99-TDcase/TD-17255.py @@ -21,6 +21,7 @@ class TDTestCase: self.rowsPerTbl = 10000 def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 d4c4a4cc32..2862f4a78d 100644 --- a/tests/system-test/99-TDcase/TD-17699.py +++ b/tests/system-test/99-TDcase/TD-17699.py @@ -53,6 +53,7 @@ class TDTestCase: hostname = socket.gethostname() def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) 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 0fd86bf6b4..2a25d1ad7e 100644 --- a/tests/system-test/99-TDcase/TD-19201.py +++ b/tests/system-test/99-TDcase/TD-19201.py @@ -14,6 +14,7 @@ class TDTestCase: hostname = socket.gethostname() def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) tdLog.debug(f"start to excute {__file__}") #tdSql.init(conn.cursor()) tdSql.init(conn.cursor(), logSql) # output sql.txt file From 99e4c0db48944a11a8d47831a902a9d76fff04af Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Thu, 3 Nov 2022 10:33:47 +0800 Subject: [PATCH 2/2] test:add testcase of checking installPackages --- packaging/testpackage.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index 20f93ecaec..b19d8257a0 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -211,7 +211,8 @@ elif [[ ${packgeName} =~ "tar" ]];then if [ ${diffNumbers} != 0 ];then echoColor R "The number and names of files is different from the previous installation package" - echoColor Y `cat ${installPath}/diffFile.log` + diffLog=`cat ${installPath}/diffFile.log` + echoColor Y "${diffLog}" exit -1 else echoColor G "The number and names of files are the same as previous installation packages"