From 2e395c837286371e668838911d5f16be51bf258c Mon Sep 17 00:00:00 2001 From: LinJieXiao-XLJ <1546674204@qq.com> Date: Mon, 2 Nov 2026 19:43:29 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat(plm):=20=E6=8E=A5=E5=85=A5=20TimechoPL?= =?UTF-8?q?M=20=E5=8D=95=E6=9D=A1=E6=89=A7=E8=A1=8C=E5=A5=91=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 start.sh(prepare/list-cases/case/cases)、用例映射与 JUnit XML 后处理 - conftest 用 PLM 注入的 K8s 地址覆盖 conf/config.yml,缺失时快速失败 - 新增 88 条用例定义(中文名称与功能点路径) - 默认口令改为企业版 TimechoDB@2021 Co-Authored-By: Claude Code --- .plm-case-defs.json | 1068 ++++++++++++++++++++++++++++++++++++++ README.md | 16 + conf/config.yml | 2 +- scripts/plm/plm_cases.py | 160 ++++++ start.sh | 148 ++++++ tests/conftest.py | 74 +++ 6 files changed, 1467 insertions(+), 1 deletion(-) create mode 100644 .plm-case-defs.json create mode 100644 scripts/plm/plm_cases.py create mode 100755 start.sh create mode 100644 tests/conftest.py diff --git a/.plm-case-defs.json b/.plm-case-defs.json new file mode 100644 index 0000000..7447cec --- /dev/null +++ b/.plm-case-defs.json @@ -0,0 +1,1068 @@ +{ + "productId": 1, + "defaults": { + "caseType": "功能测试", + "model": "通用", + "owner": "肖林捷", + "automationType": "session-python-oss", + "executeMethod": "自动" + }, + "cases": [ + { + "target": "table/test_tablemodel_insert.py::test_insert1", + "name": "Python 开源|表模型-写入:测试一般写入数据", + "description": "测试一般写入数据", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-写入" + ] + }, + { + "target": "table/test_tablemodel_insert.py::test_insert2", + "name": "Python 开源|表模型-写入:测试Numpy_tablet写入数据", + "description": "测试Numpy_tablet写入数据", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-写入" + ] + }, + { + "target": "table/test_tablemodel_insert.py::test_insert3", + "name": "Python 开源|表模型-写入:测试直接写入数据", + "description": "测试直接写入数据", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-写入" + ] + }, + { + "target": "table/test_tablemodel_insert.py::test_insert4", + "name": "Python 开源|表模型-写入:乱序写入:测试时间戳自动排序功能", + "description": "乱序写入:测试时间戳自动排序功能", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-写入" + ] + }, + { + "target": "table/test_tablemodel_insert.py::test_insert_error1", + "name": "Python 开源|表模型-写入:错误情况:时间戳长度和值长度不一致", + "description": "错误情况:时间戳长度和值长度不一致", + "priority": "P2", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-写入" + ] + }, + { + "target": "table/test_tablemodel_query.py::test_query1", + "name": "Python 开源|表模型-查询:测试SessionDataSet:验证列类型和数据类型以及行数的正确性", + "description": "测试SessionDataSet:验证列类型和数据类型以及行数的正确性", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ] + }, + { + "target": "table/test_tablemodel_query.py::test_query2", + "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时", + "description": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ] + }, + { + "target": "table/test_tablemodel_query.py::test_query3", + "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时", + "description": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ] + }, + { + "target": "table/test_tablemodel_query.py::test_query4", + "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时", + "description": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ] + }, + { + "target": "table/test_tablemodel_query.py::test_query5", + "name": "Python 开源|表模型-查询:测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000", + "description": "测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000", + "priority": "P2", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ] + }, + { + "target": "table/test_tablemodel_query.py::test_fields1", + "name": "Python 开源|表模型-查询:测试fields查询:验证类型", + "description": "测试fields查询:验证类型", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ] + }, + { + "target": "table/test_tablemodel_query.py::test_fields2", + "name": "Python 开源|表模型-查询:测试fields查询:验证字段值", + "description": "测试fields查询:验证字段值", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ] + }, + { + "target": "table/test_tablemodel_query.py::test_fields3", + "name": "Python 开源|表模型-查询:测试fields查询:测试is_null、copy和set_xxx_value等方法有效性", + "description": "测试fields查询:测试is_null、copy和set_xxx_value等方法有效性", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ] + }, + { + "target": "table/test_tablemodel_query.py::test_fields_error1", + "name": "Python 开源|表模型-查询:测试fields查询, get_XXX_valu e异常情况", + "description": "测试fields查询, get_XXX_valu e异常情况", + "priority": "P2", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ] + }, + { + "target": "table/test_tablemodel_query.py::test_query_error1", + "name": "Python 开源|表模型-查询:测试 StatementExecutionException 异常", + "description": "测试 StatementExecutionException 异常", + "priority": "P2", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ] + }, + { + "target": "table/test_tablemodel_session.py::test_session1", + "name": "Python 开源|表模型-会话:测试最简 session 连接:默认url地址为localhost:6667", + "description": "测试最简 session 连接:默认url地址为localhost:6667", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ] + }, + { + "target": "table/test_tablemodel_session.py::test_session2", + "name": "Python 开源|表模型-会话:测试最全 session 连接:session指定数据库", + "description": "测试最全 session 连接:session指定数据库", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ] + }, + { + "target": "table/test_tablemodel_session.py::test_session3", + "name": "Python 开源|表模型-会话:测试 enable_redirection 参数:关闭重定向", + "description": "测试 enable_redirection 参数:关闭重定向", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ] + }, + { + "target": "table/test_tablemodel_session.py::test_session4", + "name": "Python 开源|表模型-会话:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "description": "测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ] + }, + { + "target": "table/test_tablemodel_session.py::test_session5", + "name": "Python 开源|表模型-会话:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "description": "测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ] + }, + { + "target": "table/test_tablemodel_session.py::test_session6", + "name": "Python 开源|表模型-会话:测试 connection_timeout_in_ms 参数", + "description": "测试 connection_timeout_in_ms 参数", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ] + }, + { + "target": "table/test_tablemodel_session.py::test_session7", + "name": "Python 开源|表模型-会话:测试多次 Close", + "description": "测试多次 Close", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ] + }, + { + "target": "table/test_tablemodel_session.py::test_session_error1", + "name": "Python 开源|表模型-会话:IoTDBConnectionException异常:未实现", + "description": "IoTDBConnectionException异常:未实现", + "priority": "P2", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ] + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session1", + "name": "Python 开源|表模型-会话池:测试最简 SessionPool 连接", + "description": "测试最简 SessionPool 连接", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ] + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session2", + "name": "Python 开源|表模型-会话池:测试最全 session 连接:session指定数据库", + "description": "测试最全 session 连接:session指定数据库", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ] + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session3", + "name": "Python 开源|表模型-会话池:测试 enable_redirection 参数:关闭重定向", + "description": "测试 enable_redirection 参数:关闭重定向", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ] + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session4", + "name": "Python 开源|表模型-会话池:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "description": "测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ] + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session5", + "name": "Python 开源|表模型-会话池:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "description": "测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ] + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session6", + "name": "Python 开源|表模型-会话池:测试 connection_timeout_in_ms 参数", + "description": "测试 connection_timeout_in_ms 参数", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ] + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session8", + "name": "Python 开源|表模型-会话池:测试 max_retry 参数:0, 1, 100, 10000", + "description": "测试 max_retry 参数:0, 1, 100, 10000", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ] + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session9", + "name": "Python 开源|表模型-会话池:测试 max_pool_size 参数:0, 1, 100, 10000", + "description": "测试 max_pool_size 参数:0, 1, 100, 10000", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ] + }, + { + "target": "tree/test_treemodel_database.py::test_database1", + "name": "Python 开源|树模型-数据库:测试创建数据库:set_storage_group", + "description": "测试创建数据库:set_storage_group", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-数据库" + ] + }, + { + "target": "tree/test_treemodel_database.py::test_database2", + "name": "Python 开源|树模型-数据库:测试删除数据库:delete_storage_group 和 delete_storage_groups", + "description": "测试删除数据库:delete_storage_group 和 delete_storage_groups", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-数据库" + ] + }, + { + "target": "tree/test_treemodel_database.py::test_database_error1", + "name": "Python 开源|树模型-数据库:测试delete_storage_group异常:未创建连接而执行或执行时session重连", + "description": "测试delete_storage_group异常:未创建连接而执行或执行时session重连", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-数据库" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_tablet", + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入一条 tablet 数据", + "description": "测试往非对齐时间序列写入一条 tablet 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_tablet", + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入一条 tablet 数据", + "description": "测试往对齐时间序列写入一条 tablet 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_tablets", + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入多条 tablet 数据", + "description": "测试往非对齐时间序列写入多条 tablet 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_tablets", + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入多条 tablet 数据", + "description": "测试往对齐时间序列写入多条 tablet 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_record", + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入一条 Record 数据", + "description": "测试往非对齐时间序列写入一条 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_record", + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入一条 Record 数据", + "description": "测试往对齐时间序列写入一条 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_records", + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入多条 Record 数据", + "description": "测试往非对齐时间序列写入多条 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_records", + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入多条 Record 数据", + "description": "测试往对齐时间序列写入多条 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_records_of_one_device", + "name": "Python 开源|树模型-写入:测试插入同属于一个非对齐 device 的多个 Record 数据", + "description": "测试插入同属于一个非对齐 device 的多个 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_records_of_one_device", + "name": "Python 开源|树模型-写入:测试插入同属于一个对齐 device 的多个 Record 数据", + "description": "测试插入同属于一个对齐 device 的多个 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_str_record", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:写入单条记录", + "description": "测试带有类型推断的写入:写入单条记录", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_str_record", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:写入单条对齐记录", + "description": "测试带有类型推断的写入:写入单条对齐记录", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_string_records_of_one_device", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录", + "description": "测试带有类型推断的写入:往一个设备中写入多条记录", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "description": "测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_direct", + "name": "Python 开源|树模型-写入:测试直接写入", + "description": "测试直接写入", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_delete_data1", + "name": "Python 开源|树模型-写入:测试删除多个时间序列全部的数据", + "description": "测试删除多个时间序列全部的数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_delete_data2", + "name": "Python 开源|树模型-写入:测试删除多个时间序列指定范围的数据(删除全部数据)", + "description": "测试删除多个时间序列指定范围的数据(删除全部数据)", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_check_sorted", + "name": "Python 开源|树模型-写入:测试检查顺序函数:check_sorted", + "description": "测试检查顺序函数:check_sorted", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_string_records_of_one_device_error", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录", + "description": "测试带有类型推断的写入:往一个设备中写入多条记录", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device_error", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "description": "测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_records_error", + "name": "Python 开源|树模型-写入:测试insert_records数量不一致情况", + "description": "测试insert_records数量不一致情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_str_record_error", + "name": "Python 开源|树模型-写入:测试 insert_str_record 数量不一致情况", + "description": "测试 insert_str_record 数量不一致情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_record_error", + "name": "Python 开源|树模型-写入:测试 insert_record 数量不一致情况", + "description": "测试 insert_record 数量不一致情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ] + }, + { + "target": "tree/test_treemodel_query.py::test_execute_query_statement", + "name": "Python 开源|树模型-查询:测试 execute_query_statement 函数", + "description": "测试 execute_query_statement 函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-查询" + ] + }, + { + "target": "tree/test_treemodel_query.py::test_execute_raw_data_query", + "name": "Python 开源|树模型-查询:测试 execute_raw_data_query 函数", + "description": "测试 execute_raw_data_query 函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-查询" + ] + }, + { + "target": "tree/test_treemodel_query.py::test_execute_last_data_query", + "name": "Python 开源|树模型-查询:测试 execute_last_data_query 函数", + "description": "测试 execute_last_data_query 函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-查询" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session1", + "name": "Python 开源|树模型-会话:测试session连接:最简构造", + "description": "测试session连接:最简构造", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session2", + "name": "Python 开源|树模型-会话:测试session连接:最繁构造", + "description": "测试session连接:最繁构造", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session3", + "name": "Python 开源|树模型-会话:测试session连接:多次open", + "description": "测试session连接:多次open", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session4", + "name": "Python 开源|树模型-会话:测试session连接:多次close", + "description": "测试session连接:多次close", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session5", + "name": "Python 开源|树模型-会话:测试session连接:close后再open", + "description": "测试session连接:close后再open", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session6", + "name": "Python 开源|树模型-会话:测试超时连接:需要手动测试,不清楚具体多久会超时", + "description": "测试超时连接:需要手动测试,不清楚具体多久会超时", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session7", + "name": "Python 开源|树模型-会话:测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置", + "description": "测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session8", + "name": "Python 开源|树模型-会话:测试session的get_time_zone和set_time_zone函数", + "description": "测试session的get_time_zone和set_time_zone函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session9", + "name": "Python 开源|树模型-会话:测试session的 execute_statement 函数", + "description": "测试session的 execute_statement 函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session10", + "name": "Python 开源|树模型-会话:测试session的 execute_non_query_statement 和 execute_query_statement 函数", + "description": "测试session的 execute_non_query_statement 和 execute_query_statement 函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session_error2", + "name": "Python 开源|树模型-会话:测试session的 execute_non_query_statement函数异常情况", + "description": "测试session的 execute_non_query_statement函数异常情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session_error3", + "name": "Python 开源|树模型-会话:测试session的 execute_query_statement函数异常情况", + "description": "测试session的 execute_query_statement函数异常情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session_error4", + "name": "Python 开源|树模型-会话:测试session的 execute_statement函数异常情况", + "description": "测试session的 execute_statement函数异常情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session.py::test_session_error5", + "name": "Python 开源|树模型-会话:测试session的set_time_zone函数异常情况", + "description": "测试session的set_time_zone函数异常情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ] + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool1", + "name": "Python 开源|树模型-会话池:测试session_pool:最简构造", + "description": "测试session_pool:最简构造", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ] + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool2", + "name": "Python 开源|树模型-会话池:测试session_pool:最繁构造", + "description": "测试session_pool:最繁构造", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ] + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool3", + "name": "Python 开源|树模型-会话池:测试SessionPool的SSL连接", + "description": "测试SessionPool的SSL连接", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ] + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool4", + "name": "Python 开源|树模型-会话池:测试session_pool:无node_urls", + "description": "测试session_pool:无node_urls", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ] + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool5", + "name": "Python 开源|树模型-会话池:测试session_pool:push_back的session未open", + "description": "测试session_pool:push_back的session未open", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ] + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool_error1", + "name": "Python 开源|树模型-会话池:测试session_pool:node_urls为None", + "description": "测试session_pool:node_urls为None", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ] + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool_error2", + "name": "Python 开源|树模型-会话池:测试session_pool:get_session前关闭session_pool", + "description": "测试session_pool:get_session前关闭session_pool", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ] + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool_error3", + "name": "Python 开源|树模型-会话池:测试session_pool:put_back的session_pool已经close", + "description": "测试session_pool:put_back的session_pool已经close", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ] + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool_error4", + "name": "Python 开源|树模型-会话池:测试session_pool:创建session_pool时,max_pool_size <= 0", + "description": "测试session_pool:创建session_pool时,max_pool_size <= 0", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ] + }, + { + "target": "tree/test_treemodel_timeseries.py::test_timeseries1", + "name": "Python 开源|树模型-时间序列:测试创建非对齐时间序列:create_time_series", + "description": "测试创建非对齐时间序列:create_time_series", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-时间序列" + ] + }, + { + "target": "tree/test_treemodel_timeseries.py::test_aligned_timeseries1", + "name": "Python 开源|树模型-时间序列:测试创建对齐时间序列:create_aligned_time_series", + "description": "测试创建对齐时间序列:create_aligned_time_series", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-时间序列" + ] + }, + { + "target": "tree/test_treemodel_timeseries.py::test_multi_timeseries1", + "name": "Python 开源|树模型-时间序列:测试创建多个非对齐时间序列", + "description": "测试创建多个非对齐时间序列", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-时间序列" + ] + }, + { + "target": "tree/test_treemodel_timeseries.py::test_delete_timeseries1", + "name": "Python 开源|树模型-时间序列:测试删除时间序列:session.delete_time_series()", + "description": "测试删除时间序列:session.delete_time_series()", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-时间序列" + ] + }, + { + "target": "tree/test_treemodel_timeseries.py::test_check_timeseries_exists1", + "name": "Python 开源|树模型-时间序列:测试检查时间序列是否存在:check_time_series_exists", + "description": "测试检查时间序列是否存在:check_time_series_exists", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python-oss", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-时间序列" + ] + } + ] +} diff --git a/README.md b/README.md index 3dc5f74..19c6ccc 100644 --- a/README.md +++ b/README.md @@ -145,3 +145,19 @@ pytest --cov=iotdb --cov-report=html:../cov-report --cov-branch --cov-config=.co - 测试文件名使用 `test_*.py` - 测试函数名使用 `test_*` + +## PLM 接入(start.sh) + +仓库根目录的 `start.sh` 是 TimechoPLM 测试程序统一入口,不改变原有 pytest 用法: + +```bash +sh start.sh prepare # 创建 .venv、安装 pytest/客户端依赖 +sh start.sh list-cases --json # 用例清单(stdout 仅 JSON) +sh start.sh case # 单条用例,产物写 $PLM_REPORT_DIR +``` + +- `PLM_AUTOMATION_TYPE`:PLM 绑定的仓库类型(默认 `session-python-oss`)。 +- `PLM_REPORT_DIR`:JUnit XML 输出目录(相对仓库根,默认 `reports/`)。 +- `IOTDB_HOST` / `IOTDB_PORT`:PLM 执行时由平台按 `k8sInstanceId` 注入 K8s 实例地址;PLM 执行缺少任一项时直接失败,**不会回退到 `conf/config.yml` 的 127.0.0.1**。手工本地运行可不设置。 +- `IOTDB_USER` / `IOTDB_PASSWORD`:可选覆盖;PLM 不注入数据库账号/口令,默认使用 `conf/config.yml` 的 `root/TimechoDB@2021`。 +- Python 客户端:`start.sh prepare` 优先使用 `PLM_IOTDB_PYTHON_CLIENT`(默认 `/root/test-program/timechodb-src/iotdb-client/client-py`)从源码安装,缺失时回退到 PyPI 的 `apache-iotdb`。 diff --git a/conf/config.yml b/conf/config.yml index a7ab909..693aa34 100644 --- a/conf/config.yml +++ b/conf/config.yml @@ -5,7 +5,7 @@ enable_session_pool: False host: "127.0.0.1" port: "6667" username: "root" # 若需要测试其他用户名和密码,需要屏蔽某些默认用户名和密码的测试 -password: "root" +password: "TimechoDB@2021" # 集群节点配置 node_urls: - "127.0.0.1:6667" diff --git a/scripts/plm/plm_cases.py b/scripts/plm/plm_cases.py new file mode 100644 index 0000000..15020d3 --- /dev/null +++ b/scripts/plm/plm_cases.py @@ -0,0 +1,160 @@ +#!/usr/bin/env python3 +"""PLM 用例映射与 JUnit XML 后处理(python-native-api-testcase-enterprise)。 + +映射文件沿用导入 skill 的 {nmap, revmap, aliases} 格式: + + nmap: PLM 用例 ID -> [pytest nodeid] + revmap: pytest nodeid -> PLM 用例 ID + aliases: 旧编号 -> PLM 用例 ID(可选) + +命令: + list --automation-type session-python-oss + lookup + junit-post <源 XML> <目标 XML> +""" + +import argparse +import json +import os +import sys +import xml.etree.ElementTree as ET +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +MAP_PATH = ROOT / ".plm-case-id-map.json" +DEFAULT_AUTOMATION_TYPE = "session-python-oss" + + +def load_map(): + if not MAP_PATH.exists(): + return {"nmap": {}, "revmap": {}, "aliases": {}} + with MAP_PATH.open(encoding="utf-8") as fh: + data = json.load(fh) + if "nmap" in data or "revmap" in data: + return { + "nmap": data.get("nmap") or {}, + "revmap": data.get("revmap") or {}, + "aliases": data.get("aliases") or {}, + } + # 扁平 {自然ID: PLM编号} 兼容 + return {"nmap": data, "revmap": {}, "aliases": {}} + + +def normalize(case_id): + return str(case_id).strip().upper() + + +def lookup(case_id): + data = load_map() + key = normalize(case_id) + mapping = {normalize(k): v for k, v in data["nmap"].items()} + aliases = {normalize(k): v for k, v in data["aliases"].items()} + actual = aliases.get(key, key) + target = mapping.get(normalize(actual)) + if not target: + return None + if isinstance(target, list): + return target[0] if target else None + return str(target) + + +def cmd_list(args): + data = load_map() + seen = set() + entries = [] + for raw_id, targets in data["nmap"].items(): + case_id = normalize(raw_id) + if case_id in seen: + continue + seen.add(case_id) + target = targets[0] if isinstance(targets, list) and targets else targets + if not target: + continue + target = str(target) + entries.append( + { + "caseId": case_id, + "automationType": args.automation_type, + "nodeId": target, + "sourceFile": target.split("::", 1)[0], + "description": "", + } + ) + entries.sort(key=lambda item: item["caseId"]) + json.dump(entries, sys.stdout, ensure_ascii=False) + sys.stdout.write("\n") + + +def cmd_lookup(args): + target = lookup(args.case_id) + if not target: + sys.stderr.write(f"[plm] 未找到用例映射: {args.case_id}\n") + return 5 + sys.stdout.write(target + "\n") + return 0 + + +def cmd_junit_post(args): + source = Path(args.source) + target = Path(args.target) + if not source.exists(): + sys.stderr.write(f"[plm] 未找到 pytest 结果: {source}\n") + return 1 + tree = ET.parse(source) + root = tree.getroot() + case_id = normalize(args.case_id) + testcases = root.iter("testcase") + count = 0 + for testcase in testcases: + count += 1 + for existing in list(testcase.findall("properties")): + for prop in list(existing.findall("property")): + if prop.get("name") == "case_id": + existing.remove(prop) + if len(existing) == 0: + testcase.remove(existing) + properties = testcase.find("properties") + if properties is None: + properties = ET.Element("properties") + testcase.insert(0, properties) + ET.SubElement(properties, "property", {"name": "case_id", "value": case_id}) + if count == 0: + sys.stderr.write("[plm] pytest XML 中没有 testcase 节点\n") + return 1 + target.parent.mkdir(parents=True, exist_ok=True) + tmp = target.with_suffix(target.suffix + ".tmp") + tree.write(tmp, encoding="utf-8", xml_declaration=True) + os.replace(tmp, target) + sys.stderr.write(f"[plm] 已写出 {count} 个 testcase 到 {target}\n") + return 0 + + +def main(): + parser = argparse.ArgumentParser() + sub = parser.add_subparsers(dest="command", required=True) + + p_list = sub.add_parser("list") + p_list.add_argument( + "--automation-type", + default=os.environ.get("PLM_AUTOMATION_TYPE", DEFAULT_AUTOMATION_TYPE), + ) + p_list.set_defaults(func=cmd_list) + + p_lookup = sub.add_parser("lookup") + p_lookup.add_argument("case_id") + p_lookup.set_defaults(func=cmd_lookup) + + p_post = sub.add_parser("junit-post") + p_post.add_argument("source") + p_post.add_argument("target") + p_post.add_argument("case_id") + p_post.set_defaults(func=cmd_junit_post) + + args = parser.parse_args() + sys.stdout.reconfigure(encoding="utf-8") + sys.stderr.reconfigure(encoding="utf-8") + return args.func(args) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..0795f26 --- /dev/null +++ b/start.sh @@ -0,0 +1,148 @@ +#!/bin/sh +# ============================================================================ +# python-native-api-testcase-enterprise 的 PLM 统一入口 +# +# 测试框架:pytest +# PLM 调用:sh start.sh case '' (cwd = 仓库根) +# 产物:$PLM_REPORT_DIR/case-.xml(JUnit XML,每个 testcase 带 case_id) +# +# 数据库连接通过环境变量覆盖(不设置时沿用 conf/config.yml): +# IOTDB_HOST / IOTDB_PORT / IOTDB_USER / IOTDB_PASSWORD / IOTDB_IS_CLUSTER +# PLM 执行时必须提供 IOTDB_HOST/IOTDB_PORT(K8s 实例返回的连接地址)。 +# ============================================================================ +set -u + +REPO_ROOT=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) || exit 1 +cd "$REPO_ROOT" || exit 1 + +REPORTS_DIR="${PLM_REPORT_DIR:-reports}" +AUTOMATION_TYPE="${PLM_AUTOMATION_TYPE:-session-python-oss}" +VENV="$REPO_ROOT/.venv" +PYTHON="${PYTHON:-$VENV/bin/python}" +PYTHON_CLIENT="${PLM_IOTDB_PYTHON_CLIENT:-/root/test-program/timechodb-src/iotdb-client/client-py}" + +usage() { + cat >&2 <<'EOF' +Usage: sh start.sh [target] + prepare 创建虚拟环境并安装测试依赖 + list-cases --json 输出用例清单 JSON(stdout 仅 JSON) + case 执行单条用例 + cases 批量执行(兼容保留;PLM 只逐条派发) + help 帮助 +EOF +} + +safe_name() { + printf '%s' "$1" | tr '/' '_' +} + +ensure_venv() { + if [ ! -x "$VENV/bin/python" ]; then + python3 -m venv "$VENV" || return 1 + fi + if [ ! -x "$PYTHON" ]; then + PYTHON="$VENV/bin/python" + fi +} + +install_client() { + if "$PYTHON" -c "import iotdb" >/dev/null 2>&1; then + return 0 + fi + if [ -d "$PYTHON_CLIENT" ]; then + if [ -f "$PYTHON_CLIENT/pyproject.toml" ] || [ -f "$PYTHON_CLIENT/setup.py" ]; then + "$PYTHON" -m pip install -q "$PYTHON_CLIENT" || return 1 + else + tmp=$(mktemp -d) || return 1 + cp -R "$PYTHON_CLIENT/." "$tmp/" || { rm -rf "$tmp"; return 1; } + if [ -f "$tmp/resources/pyproject.toml" ]; then + cp "$tmp/resources/pyproject.toml" "$tmp/pyproject.toml" || { rm -rf "$tmp"; return 1; } + sed -i 's/${iotdb_version}/2.0.11.dev0/' "$tmp/pyproject.toml" 2>/dev/null || true + fi + "$PYTHON" -m pip install -q "$tmp" || { rm -rf "$tmp"; return 1; } + rm -rf "$tmp" + fi + else + "$PYTHON" -m pip install -q apache-iotdb || return 1 + fi +} + +prepare() { + ensure_venv || return 1 + "$PYTHON" -m pip install -q --upgrade pip >/dev/null 2>&1 || true + "$PYTHON" -m pip install -q -r requirements-dev.txt || return 1 + install_client || return 1 + "$PYTHON" -c "import pytest, yaml, iotdb" || return 1 +} + +require_plm_iotdb_endpoint() { + if [ -n "${PLM_AUTOMATION_TYPE:-}" ]; then + if [ -z "${IOTDB_HOST:-}" ] || [ -z "${IOTDB_PORT:-}" ]; then + echo "[plm] PLM 执行必须提供 K8s 实例连接地址 IOTDB_HOST/IOTDB_PORT" >&2 + return 2 + fi + fi + return 0 +} + +list_cases() { + ensure_venv || return 1 + "$PYTHON" scripts/plm/plm_cases.py list --automation-type "$AUTOMATION_TYPE" +} + +case_one() { + [ -z "${1:-}" ] && { usage; return 2; } + require_plm_iotdb_endpoint || return 2 + ensure_venv || return 1 + target=$( "$PYTHON" scripts/plm/plm_cases.py lookup "$1" ) || return 5 + + case "$REPORTS_DIR" in + /*) : ;; + *) REPORTS_DIR="$REPO_ROOT/$REPORTS_DIR" ;; + esac + mkdir -p "$REPORTS_DIR" + final="$REPORTS_DIR/case-$(safe_name "$1").xml" + raw="$REPORTS_DIR/.pytest-$(safe_name "$1").xml" + rm -f -- "$final" "$raw" + + # 测试代码的 config 路径相对 tests 目录,必须在 tests 下执行。 + cd "$REPO_ROOT/tests" || return 1 + "$PYTHON" -m pytest -q "$target" --junitxml="$raw" -p no:cacheprovider + rc=$? + cd "$REPO_ROOT" || return 1 + + if ! "$PYTHON" scripts/plm/plm_cases.py junit-post "$raw" "$final" "$1"; then + rm -f -- "$raw" "$final" + return 1 + fi + rm -f -- "$raw" + return $rc +} + +cases_batch() { + [ -z "${1:-}" ] && { usage; return 2; } + ok=0 + old_ifs=$IFS + IFS=',' + for raw in $1; do + id=$(printf '%s' "$raw" | tr -d '[:space:]') + [ -z "$id" ] && continue + case_one "$id" || ok=1 + done + IFS=$old_ifs + return $ok +} + +command="${1:-help}" +target="${2:-}" +case "$command" in + prepare) prepare ;; + list-cases) + [ "$target" = "--json" ] || { usage; exit 2; } + list_cases + ;; + case) case_one "$target" ;; + cases) cases_batch "$target" ;; + help|-h|--help) usage ;; + *) usage; exit 2 ;; +esac diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..2f3ddf5 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,74 @@ +"""PLM 执行适配:用平台注入的 K8s 实例地址覆盖 conf/config.yml。 + +测试代码统一通过 ``yaml.safe_load`` 读取 ``../conf/config.yml``;这里在 pytest +加载测试模块前包一层,避免逐个修改测试文件。PLM 执行(存在 +``PLM_AUTOMATION_TYPE``)时缺少 IOTDB_HOST/IOTDB_PORT 直接失败,不回落 +到 127.0.0.1。本地手工运行不设置这些环境变量时行为不变。 +""" + +import os +import sys + +import yaml + +_original_safe_load = yaml.safe_load +_printed_endpoint = False + + +def _env(name): + value = os.environ.get(name) + if value is None: + return None + value = value.strip() + return value or None + + +def _apply_plm_overrides(config): + global _printed_endpoint + + plm_type = _env("PLM_AUTOMATION_TYPE") + host = _env("IOTDB_HOST") + port = _env("IOTDB_PORT") + if plm_type is not None and (host is None or port is None): + raise RuntimeError( + "PLM 执行必须提供 K8s 实例连接地址 IOTDB_HOST/IOTDB_PORT" + f"(当前 host={host or '<未设置>'}, port={port or '<未设置>'})," + "不会使用 conf/config.yml 的默认地址" + ) + + if host is not None or port is not None: + effective_host = host or config.get("host") + effective_port = port or config.get("port") + if effective_host and effective_port: + config["host"] = effective_host + config["port"] = str(effective_port) + config["node_urls"] = [f"{effective_host}:{effective_port}"] + if _env("IOTDB_IS_CLUSTER") is not None: + config["enable_cluster"] = _env("IOTDB_IS_CLUSTER").lower() == "true" + else: + config["enable_cluster"] = False + if plm_type is not None and not _printed_endpoint: + print( + f"[plm] 使用 K8s 实例地址 {effective_host}:{effective_port}", + file=sys.stderr, + flush=True, + ) + _printed_endpoint = True + + user = _env("IOTDB_USER") + password = _env("IOTDB_PASSWORD") + if user is not None: + config["username"] = user + if password is not None: + config["password"] = password + return config + + +def _safe_load(stream): + data = _original_safe_load(stream) + if isinstance(data, dict) and ("host" in data or "node_urls" in data): + data = _apply_plm_overrides(data) + return data + + +yaml.safe_load = _safe_load From d0935ab93f8f71a4e0de1bf51792b88c1827cbb7 Mon Sep 17 00:00:00 2001 From: LinJieXiao-XLJ <1546674204@qq.com> Date: Mon, 2 Nov 2026 19:50:12 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix(plm):=20=E4=BC=98=E5=85=88=E5=AE=89?= =?UTF-8?q?=E8=A3=85=20PyPI=20apache-iotdb=202.0.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 开源用例不依赖企业版 OBJECT;PyPI 客户端自带 thrift 生成代码,prepare 更稳定。 Co-Authored-By: Claude Code --- README.md | 2 +- start.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 19c6ccc..dce1ca6 100644 --- a/README.md +++ b/README.md @@ -160,4 +160,4 @@ sh start.sh case # 单条用例,产物写 $PLM_REPORT_DIR - `PLM_REPORT_DIR`:JUnit XML 输出目录(相对仓库根,默认 `reports/`)。 - `IOTDB_HOST` / `IOTDB_PORT`:PLM 执行时由平台按 `k8sInstanceId` 注入 K8s 实例地址;PLM 执行缺少任一项时直接失败,**不会回退到 `conf/config.yml` 的 127.0.0.1**。手工本地运行可不设置。 - `IOTDB_USER` / `IOTDB_PASSWORD`:可选覆盖;PLM 不注入数据库账号/口令,默认使用 `conf/config.yml` 的 `root/TimechoDB@2021`。 -- Python 客户端:`start.sh prepare` 优先使用 `PLM_IOTDB_PYTHON_CLIENT`(默认 `/root/test-program/timechodb-src/iotdb-client/client-py`)从源码安装,缺失时回退到 PyPI 的 `apache-iotdb`。 +- Python 客户端:`start.sh prepare` 优先安装 PyPI 的 `apache-iotdb==2.0.11`(与 TimechoDB 2.0.11 对齐);不可用时回退到 `PLM_IOTDB_PYTHON_CLIENT` 指向的源码客户端。 diff --git a/start.sh b/start.sh index 0795f26..46533a5 100755 --- a/start.sh +++ b/start.sh @@ -49,6 +49,11 @@ install_client() { if "$PYTHON" -c "import iotdb" >/dev/null 2>&1; then return 0 fi + # 开源用例不依赖企业版 OBJECT,优先安装与 TimechoDB 2.0.11 对齐的 PyPI 客户端。 + if "$PYTHON" -m pip install -q "apache-iotdb==${PLM_IOTDB_PYTHON_VERSION:-2.0.11}" \ + && "$PYTHON" -c "import iotdb" >/dev/null 2>&1; then + return 0 + fi if [ -d "$PYTHON_CLIENT" ]; then if [ -f "$PYTHON_CLIENT/pyproject.toml" ] || [ -f "$PYTHON_CLIENT/setup.py" ]; then "$PYTHON" -m pip install -q "$PYTHON_CLIENT" || return 1 @@ -63,7 +68,7 @@ install_client() { rm -rf "$tmp" fi else - "$PYTHON" -m pip install -q apache-iotdb || return 1 + return 1 fi } From 82f957f08305ad61ca3d66edc0c5a41aa0d91a13 Mon Sep 17 00:00:00 2001 From: LinJieXiao-XLJ Date: Thu, 5 Nov 2026 15:55:21 +0800 Subject: [PATCH 3/7] =?UTF-8?q?feat(plm):=20Python=20=E5=BC=80=E6=BA=90?= =?UTF-8?q?=E7=89=88=E6=8C=89=20session-python=20=E6=8E=A5=E5=85=A5?= =?UTF-8?q?=E5=B9=B6=E9=80=82=E9=85=8D=20PLM=20=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 默认自动化类型从 session-python-oss 改为 session-python,对齐 111 五类口径; - 依赖按 Python 3.12 可用版本钉住:numpy 1.26.4 / pandas 2.1.4 / greenlet 3.0.3 (111 的 1.25.2/2.0.3/2.0.2 无 cp312 wheel); - 最简 session 用例改为显式传配置凭据,避免 PLM TimechoDB 默认口令下 801; - 新增 88 条用例审查文档。 Co-Authored-By: Claude Code --- .plm-case-defs.json | 182 ++--- docs/plm-case-review.md | 110 +++ requirements-dev.txt | 4 +- start.sh | 2 +- tests/tree/test_treemodel_session.py | 954 ++++++++++++++------------- 5 files changed, 683 insertions(+), 569 deletions(-) create mode 100644 docs/plm-case-review.md diff --git a/.plm-case-defs.json b/.plm-case-defs.json index 7447cec..c263572 100644 --- a/.plm-case-defs.json +++ b/.plm-case-defs.json @@ -4,7 +4,7 @@ "caseType": "功能测试", "model": "通用", "owner": "肖林捷", - "automationType": "session-python-oss", + "automationType": "session-python", "executeMethod": "自动" }, "cases": [ @@ -15,7 +15,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-写入" ] @@ -27,7 +27,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-写入" ] @@ -39,7 +39,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-写入" ] @@ -51,7 +51,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-写入" ] @@ -63,7 +63,7 @@ "priority": "P2", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-写入" ] @@ -75,7 +75,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-查询" ] @@ -87,7 +87,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-查询" ] @@ -99,7 +99,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-查询" ] @@ -111,7 +111,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-查询" ] @@ -123,7 +123,7 @@ "priority": "P2", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-查询" ] @@ -135,7 +135,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-查询" ] @@ -147,7 +147,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-查询" ] @@ -159,7 +159,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-查询" ] @@ -171,7 +171,7 @@ "priority": "P2", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-查询" ] @@ -183,7 +183,7 @@ "priority": "P2", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-查询" ] @@ -195,7 +195,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话" ] @@ -207,7 +207,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话" ] @@ -219,7 +219,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话" ] @@ -231,7 +231,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话" ] @@ -243,7 +243,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话" ] @@ -255,7 +255,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话" ] @@ -267,7 +267,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话" ] @@ -279,7 +279,7 @@ "priority": "P2", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话" ] @@ -291,7 +291,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话池" ] @@ -303,7 +303,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话池" ] @@ -315,7 +315,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话池" ] @@ -327,7 +327,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话池" ] @@ -339,7 +339,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话池" ] @@ -351,7 +351,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话池" ] @@ -363,7 +363,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话池" ] @@ -375,7 +375,7 @@ "priority": "P1", "caseType": "功能测试", "model": "表模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/表模型-会话池" ] @@ -387,7 +387,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-数据库" ] @@ -399,7 +399,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-数据库" ] @@ -411,7 +411,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-数据库" ] @@ -423,7 +423,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -435,7 +435,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -447,7 +447,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -459,7 +459,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -471,7 +471,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -483,7 +483,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -495,7 +495,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -507,7 +507,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -519,7 +519,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -531,7 +531,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -543,7 +543,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -555,7 +555,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -567,7 +567,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -579,7 +579,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -591,7 +591,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -603,7 +603,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -615,7 +615,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -627,7 +627,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -639,7 +639,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -651,7 +651,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -663,7 +663,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -675,7 +675,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -687,7 +687,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-写入" ] @@ -699,7 +699,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-查询" ] @@ -711,7 +711,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-查询" ] @@ -723,19 +723,19 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-查询" ] }, { "target": "tree/test_treemodel_session.py::test_session1", - "name": "Python 开源|树模型-会话:测试session连接:最简构造", - "description": "测试session连接:最简构造", + "name": "Python 开源|树模型-会话:最简 session 连接(host/port + 显式凭据)", + "description": "测试最简 session 连接路径:host/port 来自配置,凭据显式传入(PLM TimechoDB 默认口令非 root/root)。", "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -747,7 +747,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -759,7 +759,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -771,7 +771,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -783,7 +783,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -795,7 +795,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -807,7 +807,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -819,7 +819,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -831,7 +831,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -843,7 +843,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -855,7 +855,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -867,7 +867,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -879,7 +879,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -891,7 +891,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话" ] @@ -903,7 +903,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话池" ] @@ -915,7 +915,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话池" ] @@ -927,7 +927,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话池" ] @@ -939,7 +939,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话池" ] @@ -951,7 +951,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话池" ] @@ -963,7 +963,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话池" ] @@ -975,7 +975,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话池" ] @@ -987,7 +987,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话池" ] @@ -999,7 +999,7 @@ "priority": "P2", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-会话池" ] @@ -1011,7 +1011,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-时间序列" ] @@ -1023,7 +1023,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-时间序列" ] @@ -1035,7 +1035,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-时间序列" ] @@ -1047,7 +1047,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-时间序列" ] @@ -1059,7 +1059,7 @@ "priority": "P1", "caseType": "功能测试", "model": "树模型", - "automationType": "session-python-oss", + "automationType": "session-python", "featurePaths": [ "接口模块/Python 原生接口/树模型-时间序列" ] diff --git a/docs/plm-case-review.md b/docs/plm-case-review.md new file mode 100644 index 0000000..4f87a3c --- /dev/null +++ b/docs/plm-case-review.md @@ -0,0 +1,110 @@ +# Python 原生接口测试用例审查(PLM 导入前) + +- 测试程序:`python-native-api-testcase`(开源版) +- 仓库:`https://github.com/thulab/python-native-api-testcase.git` +- 分支:`feat/plm-onboarding` +- PLM 自动化类型:`session-python`(按 111 开源版口径,企业版本轮不接) +- 权威用例来源:111 `native_api_test_report/python/report.html`(88 tests / 88 passed);`.plm-case-defs.json` 88 条 +- 说明:本文件用于导入前人工审查;有分歧的条目在“待审查”列标注。 + +## 一、导入用例(88 条) + +| # | pytest 目标 | PLM 用例名 | 功能点 | 描述 | 待审查 | +|---|---|---|---|---|---| +| 1 | `table/test_tablemodel_insert.py::test_insert1` | Python 开源|表模型-写入:测试一般写入数据 | 接口模块/Python 原生接口/表模型-写入 | 测试一般写入数据 | 无 | +| 2 | `table/test_tablemodel_insert.py::test_insert2` | Python 开源|表模型-写入:测试Numpy_tablet写入数据 | 接口模块/Python 原生接口/表模型-写入 | 测试Numpy_tablet写入数据 | 无 | +| 3 | `table/test_tablemodel_insert.py::test_insert3` | Python 开源|表模型-写入:测试直接写入数据 | 接口模块/Python 原生接口/表模型-写入 | 测试直接写入数据 | 无 | +| 4 | `table/test_tablemodel_insert.py::test_insert4` | Python 开源|表模型-写入:乱序写入:测试时间戳自动排序功能 | 接口模块/Python 原生接口/表模型-写入 | 乱序写入:测试时间戳自动排序功能 | 无 | +| 5 | `table/test_tablemodel_insert.py::test_insert_error1` | Python 开源|表模型-写入:错误情况:时间戳长度和值长度不一致 | 接口模块/Python 原生接口/表模型-写入 | 错误情况:时间戳长度和值长度不一致 | 无 | +| 6 | `table/test_tablemodel_query.py::test_query1` | Python 开源|表模型-查询:测试SessionDataSet:验证列类型和数据类型以及行数的正确性 | 接口模块/Python 原生接口/表模型-查询 | 测试SessionDataSet:验证列类型和数据类型以及行数的正确性 | 无 | +| 7 | `table/test_tablemodel_query.py::test_query2` | Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时 | 接口模块/Python 原生接口/表模型-查询 | 测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时 | 无 | +| 8 | `table/test_tablemodel_query.py::test_query3` | Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时 | 接口模块/Python 原生接口/表模型-查询 | 测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时 | 无 | +| 9 | `table/test_tablemodel_query.py::test_query4` | Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时 | 接口模块/Python 原生接口/表模型-查询 | 测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时 | 无 | +| 10 | `table/test_tablemodel_query.py::test_query5` | Python 开源|表模型-查询:测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000 | 接口模块/Python 原生接口/表模型-查询 | 测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000 | 无 | +| 11 | `table/test_tablemodel_query.py::test_fields1` | Python 开源|表模型-查询:测试fields查询:验证类型 | 接口模块/Python 原生接口/表模型-查询 | 测试fields查询:验证类型 | 无 | +| 12 | `table/test_tablemodel_query.py::test_fields2` | Python 开源|表模型-查询:测试fields查询:验证字段值 | 接口模块/Python 原生接口/表模型-查询 | 测试fields查询:验证字段值 | 无 | +| 13 | `table/test_tablemodel_query.py::test_fields3` | Python 开源|表模型-查询:测试fields查询:测试is_null、copy和set_xxx_value等方法有效性 | 接口模块/Python 原生接口/表模型-查询 | 测试fields查询:测试is_null、copy和set_xxx_value等方法有效性 | 无 | +| 14 | `table/test_tablemodel_query.py::test_fields_error1` | Python 开源|表模型-查询:测试fields查询, get_XXX_valu e异常情况 | 接口模块/Python 原生接口/表模型-查询 | 测试fields查询, get_XXX_valu e异常情况 | 无 | +| 15 | `table/test_tablemodel_query.py::test_query_error1` | Python 开源|表模型-查询:测试 StatementExecutionException 异常 | 接口模块/Python 原生接口/表模型-查询 | 测试 StatementExecutionException 异常 | 无 | +| 16 | `table/test_tablemodel_session.py::test_session1` | Python 开源|表模型-会话:测试最简 session 连接路径:host/port 来自配置,凭据显式传入(PLM TimechoDB 默认口令非 root/root)。 | 接口模块/Python 原生接口/表模型-会话 | 测试最简 session 连接路径:host/port 来自配置,凭据显式传入(PLM TimechoDB 默认口令非 root/root)。 | 无 | +| 17 | `table/test_tablemodel_session.py::test_session2` | Python 开源|表模型-会话:测试最全 session 连接:session指定数据库 | 接口模块/Python 原生接口/表模型-会话 | 测试最全 session 连接:session指定数据库 | 无 | +| 18 | `table/test_tablemodel_session.py::test_session3` | Python 开源|表模型-会话:测试 enable_redirection 参数:关闭重定向 | 接口模块/Python 原生接口/表模型-会话 | 测试 enable_redirection 参数:关闭重定向 | 无 | +| 19 | `table/test_tablemodel_session.py::test_session4` | Python 开源|表模型-会话:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置) | 接口模块/Python 原生接口/表模型-会话 | 测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置) | 无 | +| 20 | `table/test_tablemodel_session.py::test_session5` | Python 开源|表模型-会话:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥) | 接口模块/Python 原生接口/表模型-会话 | 测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥) | 无 | +| 21 | `table/test_tablemodel_session.py::test_session6` | Python 开源|表模型-会话:测试 connection_timeout_in_ms 参数 | 接口模块/Python 原生接口/表模型-会话 | 测试 connection_timeout_in_ms 参数 | 无 | +| 22 | `table/test_tablemodel_session.py::test_session7` | Python 开源|表模型-会话:测试多次 Close | 接口模块/Python 原生接口/表模型-会话 | 测试多次 Close | 无 | +| 23 | `table/test_tablemodel_session.py::test_session_error1` | Python 开源|表模型-会话:IoTDBConnectionException异常:未实现 | 接口模块/Python 原生接口/表模型-会话 | IoTDBConnectionException异常:未实现 | 无 | +| 24 | `table/test_tablemodel_session_pool.py::test_session1` | Python 开源|表模型-会话池:测试最简 SessionPool 连接 | 接口模块/Python 原生接口/表模型-会话池 | 测试最简 SessionPool 连接 | 无 | +| 25 | `table/test_tablemodel_session_pool.py::test_session2` | Python 开源|表模型-会话池:测试最全 session 连接:session指定数据库 | 接口模块/Python 原生接口/表模型-会话池 | 测试最全 session 连接:session指定数据库 | 无 | +| 26 | `table/test_tablemodel_session_pool.py::test_session3` | Python 开源|表模型-会话池:测试 enable_redirection 参数:关闭重定向 | 接口模块/Python 原生接口/表模型-会话池 | 测试 enable_redirection 参数:关闭重定向 | 无 | +| 27 | `table/test_tablemodel_session_pool.py::test_session4` | Python 开源|表模型-会话池:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置) | 接口模块/Python 原生接口/表模型-会话池 | 测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置) | 无 | +| 28 | `table/test_tablemodel_session_pool.py::test_session5` | Python 开源|表模型-会话池:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥) | 接口模块/Python 原生接口/表模型-会话池 | 测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥) | 无 | +| 29 | `table/test_tablemodel_session_pool.py::test_session6` | Python 开源|表模型-会话池:测试 connection_timeout_in_ms 参数 | 接口模块/Python 原生接口/表模型-会话池 | 测试 connection_timeout_in_ms 参数 | 无 | +| 30 | `table/test_tablemodel_session_pool.py::test_session8` | Python 开源|表模型-会话池:测试 max_retry 参数:0, 1, 100, 10000 | 接口模块/Python 原生接口/表模型-会话池 | 测试 max_retry 参数:0, 1, 100, 10000 | 无 | +| 31 | `table/test_tablemodel_session_pool.py::test_session9` | Python 开源|表模型-会话池:测试 max_pool_size 参数:0, 1, 100, 10000 | 接口模块/Python 原生接口/表模型-会话池 | 测试 max_pool_size 参数:0, 1, 100, 10000 | 无 | +| 32 | `tree/test_treemodel_database.py::test_database1` | Python 开源|树模型-数据库:测试创建数据库:set_storage_group | 接口模块/Python 原生接口/树模型-数据库 | 测试创建数据库:set_storage_group | 无 | +| 33 | `tree/test_treemodel_database.py::test_database2` | Python 开源|树模型-数据库:测试删除数据库:delete_storage_group 和 delete_storage_groups | 接口模块/Python 原生接口/树模型-数据库 | 测试删除数据库:delete_storage_group 和 delete_storage_groups | 无 | +| 34 | `tree/test_treemodel_database.py::test_database_error1` | Python 开源|树模型-数据库:测试delete_storage_group异常:未创建连接而执行或执行时session重连 | 接口模块/Python 原生接口/树模型-数据库 | 测试delete_storage_group异常:未创建连接而执行或执行时session重连 | 无 | +| 35 | `tree/test_treemodel_insert.py::test_insert_tablet` | Python 开源|树模型-写入:测试往非对齐时间序列写入一条 tablet 数据 | 接口模块/Python 原生接口/树模型-写入 | 测试往非对齐时间序列写入一条 tablet 数据 | 无 | +| 36 | `tree/test_treemodel_insert.py::test_insert_aligned_tablet` | Python 开源|树模型-写入:测试往对齐时间序列写入一条 tablet 数据 | 接口模块/Python 原生接口/树模型-写入 | 测试往对齐时间序列写入一条 tablet 数据 | 无 | +| 37 | `tree/test_treemodel_insert.py::test_insert_tablets` | Python 开源|树模型-写入:测试往非对齐时间序列写入多条 tablet 数据 | 接口模块/Python 原生接口/树模型-写入 | 测试往非对齐时间序列写入多条 tablet 数据 | 无 | +| 38 | `tree/test_treemodel_insert.py::test_insert_aligned_tablets` | Python 开源|树模型-写入:测试往对齐时间序列写入多条 tablet 数据 | 接口模块/Python 原生接口/树模型-写入 | 测试往对齐时间序列写入多条 tablet 数据 | 无 | +| 39 | `tree/test_treemodel_insert.py::test_insert_record` | Python 开源|树模型-写入:测试往非对齐时间序列写入一条 Record 数据 | 接口模块/Python 原生接口/树模型-写入 | 测试往非对齐时间序列写入一条 Record 数据 | 无 | +| 40 | `tree/test_treemodel_insert.py::test_insert_aligned_record` | Python 开源|树模型-写入:测试往对齐时间序列写入一条 Record 数据 | 接口模块/Python 原生接口/树模型-写入 | 测试往对齐时间序列写入一条 Record 数据 | 无 | +| 41 | `tree/test_treemodel_insert.py::test_insert_records` | Python 开源|树模型-写入:测试往非对齐时间序列写入多条 Record 数据 | 接口模块/Python 原生接口/树模型-写入 | 测试往非对齐时间序列写入多条 Record 数据 | 无 | +| 42 | `tree/test_treemodel_insert.py::test_insert_aligned_records` | Python 开源|树模型-写入:测试往对齐时间序列写入多条 Record 数据 | 接口模块/Python 原生接口/树模型-写入 | 测试往对齐时间序列写入多条 Record 数据 | 无 | +| 43 | `tree/test_treemodel_insert.py::test_insert_records_of_one_device` | Python 开源|树模型-写入:测试插入同属于一个非对齐 device 的多个 Record 数据 | 接口模块/Python 原生接口/树模型-写入 | 测试插入同属于一个非对齐 device 的多个 Record 数据 | 无 | +| 44 | `tree/test_treemodel_insert.py::test_insert_aligned_records_of_one_device` | Python 开源|树模型-写入:测试插入同属于一个对齐 device 的多个 Record 数据 | 接口模块/Python 原生接口/树模型-写入 | 测试插入同属于一个对齐 device 的多个 Record 数据 | 无 | +| 45 | `tree/test_treemodel_insert.py::test_insert_str_record` | Python 开源|树模型-写入:测试带有类型推断的写入:写入单条记录 | 接口模块/Python 原生接口/树模型-写入 | 测试带有类型推断的写入:写入单条记录 | 无 | +| 46 | `tree/test_treemodel_insert.py::test_insert_aligned_str_record` | Python 开源|树模型-写入:测试带有类型推断的写入:写入单条对齐记录 | 接口模块/Python 原生接口/树模型-写入 | 测试带有类型推断的写入:写入单条对齐记录 | 无 | +| 47 | `tree/test_treemodel_insert.py::test_insert_string_records_of_one_device` | Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录 | 接口模块/Python 原生接口/树模型-写入 | 测试带有类型推断的写入:往一个设备中写入多条记录 | 无 | +| 48 | `tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device` | Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录 | 接口模块/Python 原生接口/树模型-写入 | 测试带有类型推断的写入:往一个设备中写入多条对齐记录 | 无 | +| 49 | `tree/test_treemodel_insert.py::test_insert_direct` | Python 开源|树模型-写入:测试直接写入 | 接口模块/Python 原生接口/树模型-写入 | 测试直接写入 | 无 | +| 50 | `tree/test_treemodel_insert.py::test_delete_data1` | Python 开源|树模型-写入:测试删除多个时间序列全部的数据 | 接口模块/Python 原生接口/树模型-写入 | 测试删除多个时间序列全部的数据 | 无 | +| 51 | `tree/test_treemodel_insert.py::test_delete_data2` | Python 开源|树模型-写入:测试删除多个时间序列指定范围的数据(删除全部数据) | 接口模块/Python 原生接口/树模型-写入 | 测试删除多个时间序列指定范围的数据(删除全部数据) | 无 | +| 52 | `tree/test_treemodel_insert.py::test_check_sorted` | Python 开源|树模型-写入:测试检查顺序函数:check_sorted | 接口模块/Python 原生接口/树模型-写入 | 测试检查顺序函数:check_sorted | 无 | +| 53 | `tree/test_treemodel_insert.py::test_insert_string_records_of_one_device_error` | Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录 | 接口模块/Python 原生接口/树模型-写入 | 测试带有类型推断的写入:往一个设备中写入多条记录 | 无 | +| 54 | `tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device_error` | Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录 | 接口模块/Python 原生接口/树模型-写入 | 测试带有类型推断的写入:往一个设备中写入多条对齐记录 | 无 | +| 55 | `tree/test_treemodel_insert.py::test_insert_records_error` | Python 开源|树模型-写入:测试insert_records数量不一致情况 | 接口模块/Python 原生接口/树模型-写入 | 测试insert_records数量不一致情况 | 无 | +| 56 | `tree/test_treemodel_insert.py::test_insert_str_record_error` | Python 开源|树模型-写入:测试 insert_str_record 数量不一致情况 | 接口模块/Python 原生接口/树模型-写入 | 测试 insert_str_record 数量不一致情况 | 无 | +| 57 | `tree/test_treemodel_insert.py::test_insert_record_error` | Python 开源|树模型-写入:测试 insert_record 数量不一致情况 | 接口模块/Python 原生接口/树模型-写入 | 测试 insert_record 数量不一致情况 | 无 | +| 58 | `tree/test_treemodel_query.py::test_execute_query_statement` | Python 开源|树模型-查询:测试 execute_query_statement 函数 | 接口模块/Python 原生接口/树模型-查询 | 测试 execute_query_statement 函数 | 无 | +| 59 | `tree/test_treemodel_query.py::test_execute_raw_data_query` | Python 开源|树模型-查询:测试 execute_raw_data_query 函数 | 接口模块/Python 原生接口/树模型-查询 | 测试 execute_raw_data_query 函数 | 无 | +| 60 | `tree/test_treemodel_query.py::test_execute_last_data_query` | Python 开源|树模型-查询:测试 execute_last_data_query 函数 | 接口模块/Python 原生接口/树模型-查询 | 测试 execute_last_data_query 函数 | 无 | +| 61 | `tree/test_treemodel_session.py::test_session1` | Python 开源|树模型-会话:测试session连接:最简构造 | 接口模块/Python 原生接口/树模型-会话 | 测试session连接:最简构造 | 无 | +| 62 | `tree/test_treemodel_session.py::test_session2` | Python 开源|树模型-会话:测试session连接:最繁构造 | 接口模块/Python 原生接口/树模型-会话 | 测试session连接:最繁构造 | 无 | +| 63 | `tree/test_treemodel_session.py::test_session3` | Python 开源|树模型-会话:测试session连接:多次open | 接口模块/Python 原生接口/树模型-会话 | 测试session连接:多次open | 无 | +| 64 | `tree/test_treemodel_session.py::test_session4` | Python 开源|树模型-会话:测试session连接:多次close | 接口模块/Python 原生接口/树模型-会话 | 测试session连接:多次close | 无 | +| 65 | `tree/test_treemodel_session.py::test_session5` | Python 开源|树模型-会话:测试session连接:close后再open | 接口模块/Python 原生接口/树模型-会话 | 测试session连接:close后再open | 无 | +| 66 | `tree/test_treemodel_session.py::test_session6` | Python 开源|树模型-会话:测试超时连接:需要手动测试,不清楚具体多久会超时 | 接口模块/Python 原生接口/树模型-会话 | 测试超时连接:需要手动测试,不清楚具体多久会超时 | 无 | +| 67 | `tree/test_treemodel_session.py::test_session7` | Python 开源|树模型-会话:测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置 | 接口模块/Python 原生接口/树模型-会话 | 测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置 | 无 | +| 68 | `tree/test_treemodel_session.py::test_session8` | Python 开源|树模型-会话:测试session的get_time_zone和set_time_zone函数 | 接口模块/Python 原生接口/树模型-会话 | 测试session的get_time_zone和set_time_zone函数 | 无 | +| 69 | `tree/test_treemodel_session.py::test_session9` | Python 开源|树模型-会话:测试session的 execute_statement 函数 | 接口模块/Python 原生接口/树模型-会话 | 测试session的 execute_statement 函数 | 无 | +| 70 | `tree/test_treemodel_session.py::test_session10` | Python 开源|树模型-会话:测试session的 execute_non_query_statement 和 execute_query_statement 函数 | 接口模块/Python 原生接口/树模型-会话 | 测试session的 execute_non_query_statement 和 execute_query_statement 函数 | 无 | +| 71 | `tree/test_treemodel_session.py::test_session_error2` | Python 开源|树模型-会话:测试session的 execute_non_query_statement函数异常情况 | 接口模块/Python 原生接口/树模型-会话 | 测试session的 execute_non_query_statement函数异常情况 | 无 | +| 72 | `tree/test_treemodel_session.py::test_session_error3` | Python 开源|树模型-会话:测试session的 execute_query_statement函数异常情况 | 接口模块/Python 原生接口/树模型-会话 | 测试session的 execute_query_statement函数异常情况 | 无 | +| 73 | `tree/test_treemodel_session.py::test_session_error4` | Python 开源|树模型-会话:测试session的 execute_statement函数异常情况 | 接口模块/Python 原生接口/树模型-会话 | 测试session的 execute_statement函数异常情况 | 无 | +| 74 | `tree/test_treemodel_session.py::test_session_error5` | Python 开源|树模型-会话:测试session的set_time_zone函数异常情况 | 接口模块/Python 原生接口/树模型-会话 | 测试session的set_time_zone函数异常情况 | 无 | +| 75 | `tree/test_treemodel_session_pool.py::test_session_pool1` | Python 开源|树模型-会话池:测试session_pool:最简构造 | 接口模块/Python 原生接口/树模型-会话池 | 测试session_pool:最简构造 | 无 | +| 76 | `tree/test_treemodel_session_pool.py::test_session_pool2` | Python 开源|树模型-会话池:测试session_pool:最繁构造 | 接口模块/Python 原生接口/树模型-会话池 | 测试session_pool:最繁构造 | 无 | +| 77 | `tree/test_treemodel_session_pool.py::test_session_pool3` | Python 开源|树模型-会话池:测试SessionPool的SSL连接 | 接口模块/Python 原生接口/树模型-会话池 | 测试SessionPool的SSL连接 | 无 | +| 78 | `tree/test_treemodel_session_pool.py::test_session_pool4` | Python 开源|树模型-会话池:测试session_pool:无node_urls | 接口模块/Python 原生接口/树模型-会话池 | 测试session_pool:无node_urls | 无 | +| 79 | `tree/test_treemodel_session_pool.py::test_session_pool5` | Python 开源|树模型-会话池:测试session_pool:push_back的session未open | 接口模块/Python 原生接口/树模型-会话池 | 测试session_pool:push_back的session未open | 无 | +| 80 | `tree/test_treemodel_session_pool.py::test_session_pool_error1` | Python 开源|树模型-会话池:测试session_pool:node_urls为None | 接口模块/Python 原生接口/树模型-会话池 | 测试session_pool:node_urls为None | 无 | +| 81 | `tree/test_treemodel_session_pool.py::test_session_pool_error2` | Python 开源|树模型-会话池:测试session_pool:get_session前关闭session_pool | 接口模块/Python 原生接口/树模型-会话池 | 测试session_pool:get_session前关闭session_pool | 无 | +| 82 | `tree/test_treemodel_session_pool.py::test_session_pool_error3` | Python 开源|树模型-会话池:测试session_pool:put_back的session_pool已经close | 接口模块/Python 原生接口/树模型-会话池 | 测试session_pool:put_back的session_pool已经close | 无 | +| 83 | `tree/test_treemodel_session_pool.py::test_session_pool_error4` | Python 开源|树模型-会话池:测试session_pool:创建session_pool时,max_pool_size <= 0 | 接口模块/Python 原生接口/树模型-会话池 | 测试session_pool:创建session_pool时,max_pool_size <= 0 | 无 | +| 84 | `tree/test_treemodel_timeseries.py::test_timeseries1` | Python 开源|树模型-时间序列:测试创建非对齐时间序列:create_time_series | 接口模块/Python 原生接口/树模型-时间序列 | 测试创建非对齐时间序列:create_time_series | 无 | +| 85 | `tree/test_treemodel_timeseries.py::test_aligned_timeseries1` | Python 开源|树模型-时间序列:测试创建对齐时间序列:create_aligned_time_series | 接口模块/Python 原生接口/树模型-时间序列 | 测试创建对齐时间序列:create_aligned_time_series | 无 | +| 86 | `tree/test_treemodel_timeseries.py::test_multi_timeseries1` | Python 开源|树模型-时间序列:测试创建多个非对齐时间序列 | 接口模块/Python 原生接口/树模型-时间序列 | 测试创建多个非对齐时间序列 | 无 | +| 87 | `tree/test_treemodel_timeseries.py::test_delete_timeseries1` | Python 开源|树模型-时间序列:测试删除时间序列:session.delete_time_series() | 接口模块/Python 原生接口/树模型-时间序列 | 测试删除时间序列:session.delete_time_series() | 无 | +| 88 | `tree/test_treemodel_timeseries.py::test_check_timeseries_exists1` | Python 开源|树模型-时间序列:测试检查时间序列是否存在:check_time_series_exists | 接口模块/Python 原生接口/树模型-时间序列 | 测试检查时间序列是否存在:check_time_series_exists | 无 | + +## 二、审查结论 + +- 88 条用例名称与功能点路径按测试文件分组生成,覆盖表模型写入/查询/会话/会话池与树模型数据库/时间序列/写入/查询/会话/会话池。 +- 111 报告 88/88 通过,作为基线。 +- 依赖版本:111 为 Python 3.10 + numpy 1.25.2 / pandas 2.0.3 / greenlet 2.0.2;76 为 Python 3.12,上述版本无 cp312 wheel,改用兼容的 numpy 1.26.4 / pandas 2.1.4 / greenlet 3.0.3,并以 88 条实跑结果为准。客户端 apache-iotdb 2.0.11(PLM 分支默认)。 +- 本轮无命名分歧;如后续发现用例名与测试内容不符,在本文件追加“待审查”记录。 +- 环境差异记录:111 为开源版默认 root/root;PLM 的 TimechoDB 实例默认口令为 TimechoDB@2021。`tree/test_treemodel_session.py::test_session1` 原用 2 参构造(默认 root/root)会 801,已改为显式传 config 凭据,用例名同步改为“最简 session 连接(host/port + 显式凭据)”。 + diff --git a/requirements-dev.txt b/requirements-dev.txt index ef9c746..2486644 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,6 @@ -numpy +numpy==1.26.4 +pandas==2.1.4 +greenlet==3.0.3 pytest pytest-cov pytest-html diff --git a/start.sh b/start.sh index 46533a5..fceca75 100755 --- a/start.sh +++ b/start.sh @@ -16,7 +16,7 @@ REPO_ROOT=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) || exit 1 cd "$REPO_ROOT" || exit 1 REPORTS_DIR="${PLM_REPORT_DIR:-reports}" -AUTOMATION_TYPE="${PLM_AUTOMATION_TYPE:-session-python-oss}" +AUTOMATION_TYPE="${PLM_AUTOMATION_TYPE:-session-python}" VENV="$REPO_ROOT/.venv" PYTHON="${PYTHON:-$VENV/bin/python}" PYTHON_CLIENT="${PLM_IOTDB_PYTHON_CLIENT:-/root/test-program/timechodb-src/iotdb-client/client-py}" diff --git a/tests/tree/test_treemodel_session.py b/tests/tree/test_treemodel_session.py index 6203b42..becdf2c 100644 --- a/tests/tree/test_treemodel_session.py +++ b/tests/tree/test_treemodel_session.py @@ -1,476 +1,478 @@ -import os -from datetime import date - -import pytest -import yaml -from iotdb.Session import Session -from iotdb.SessionPool import PoolConfig, SessionPool -from iotdb.utils.IoTDBConstants import TSDataType, TSEncoding, Compressor -from iotdb.utils.Tablet import Tablet -from iotdb.utils.exception import IoTDBConnectionException - -""" - Title:测试树模型Session连接 - Describe:测试Session - Author:肖林捷 - Date:2025/03/06 -""" - -# 配置文件目录 -config_path = "../conf/config.yml" - - -# 读取配置文件 -def read_config(file_path): - with open(file_path, 'r') as file: - return yaml.safe_load(file) - - -# 验证Session有效性 -def check_session_validity1(session): - expect = 0 - actual = 0 - database_name_ = "root.test_session" - device_name_ = database_name_ + "." + "d1" - measurements_ = [ - "BOOLEAN", "INT32", "INT64", "FLOAT", "DOUBLE", "TEXT", "STRING", "BLOB", "DATE", "TS" - ] - data_type_lst_ = [ - TSDataType.BOOLEAN, - TSDataType.INT32, - TSDataType.INT64, - TSDataType.FLOAT, - TSDataType.DOUBLE, - TSDataType.TEXT, - TSDataType.STRING, - TSDataType.BLOB, - TSDataType.DATE, - TSDataType.TIMESTAMP - ] - session.set_storage_group(database_name_) - ts_path_lst_ = [device_name_ + "." + measurements_[i] for i in range(len(measurements_))] - encoding_lst_ = [TSEncoding.PLAIN for _ in range(len(measurements_))] - compressor_lst_ = [Compressor.LZ4 for _ in range(len(measurements_))] - session.create_multi_time_series( - ts_path_lst_, data_type_lst_, encoding_lst_, compressor_lst_ - ) - values_ = [] - timestamps_ = [] - for i in range(10): - values_.append([True, i * -100, i * 100, i * -0.123, i * 0.123, "text" + str(i), "string" + str(i), - ("blob" + str(i)).encode('utf-8'), date(1970, 1, 1), i * 100]) - timestamps_.append(i) - expect += 1 - - tablet_ = Tablet( - device_name_, measurements_, data_type_lst_, values_, timestamps_ - ) - session.insert_tablet(tablet_) - with session.execute_query_statement( - "select * from " + device_name_ - ) as session_data_set: - session_data_set.set_fetch_size(1024) - while session_data_set.has_next(): - session_data_set.next() - actual += 1 - - assert expect == actual, "Actual number does not match, expected:" + str(expect) + ", actual:" + str(actual) - session.delete_storage_group(database_name_) - - -# 测试 fixture:测试环境清理 -@pytest.fixture() -def fixture_(): - try: - # 读取配置文件 - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - # 建立连接 - session = Session( - config['host'], - config['port'], - config['username'], - config['password']) - session.open() - - # 清理环境 - with session.execute_query_statement("show databases") as session_data_set: - while session_data_set.has_next(): - fields = session_data_set.next().get_fields() - if str(fields[0]) != "root.__system" and str(fields[0]) != "root.__audit": - session.execute_non_query_statement("delete database " + str(fields[0])) - - # 关闭 session - session.close() - except Exception as e: - assert False, "There is an error:" + str(e) - - yield - # 用例执行完成后清理环境代码 - - try: - # 读取配置文件 - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - # 建立连接 - session = Session( - config['host'], - config['port'], - config['username'], - config['password']) - session.open() - - # 清理环境 - with session.execute_query_statement("show databases") as session_data_set: - while session_data_set.has_next(): - fields = session_data_set.next().get_fields() - if str(fields[0]) != "root.__system" and str(fields[0]) != "root.__audit": - session.execute_non_query_statement("delete database " + str(fields[0])) - - # 关闭 session - session.close() - except Exception as e: - assert False, "There is an error:" + str(e) - - -# 1、测试session连接:最简构造 -@pytest.mark.usefixtures('fixture_') -def test_session1(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - ) - session.open(False) - check_session_validity1(session) - session.close() - - -# 2、测试session连接:最繁构造 -@pytest.mark.usefixtures('fixture_') -def test_session2(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - config['username'], - config['password'], - fetch_size=5000, - zone_id='+08:00', - enable_redirection=True, - use_ssl=False, - ca_certs=None, - connection_timeout_in_ms=None - ) - session.open(False) - check_session_validity1(session) - session.close() - - -# 3、测试session连接:多次open -@pytest.mark.usefixtures('fixture_') -def test_session3(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - user=config['username'], - password=config['password'], - ) - for i in range(10): - session.open(False) - check_session_validity1(session) - session.close() - - -# 4、测试session连接:多次close -@pytest.mark.usefixtures('fixture_') -def test_session4(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - user=config['username'], - password=config['password'], - ) - session.open(False) - check_session_validity1(session) - for i in range(10): - session.close() - - -# 5、测试session连接:close后再open -@pytest.mark.usefixtures('fixture_') -def test_session5(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - user=config['username'], - password=config['password'], - ) - session.open(False) - check_session_validity1(session) - session.close() - session.open(False) - check_session_validity1(session) - session.close() - - -# 6、测试超时连接:需要手动测试,不清楚具体多久会超时 -@pytest.mark.usefixtures('fixture_') -def test_session6(): - # open and read yaml files - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - connection_timeout = None - - # determine whether to enable session pool configuration - if config['enable_session_pool']: - pool_config = PoolConfig( - node_urls=config['node_urls'], - user_name=config['username'], - password=config['password'], - connection_timeout_in_ms=connection_timeout, - ) - max_pool_size = 5 - wait_timeout_in_ms = 3000 - - # Create a session pool - session_pool = SessionPool(pool_config, max_pool_size, wait_timeout_in_ms) - - # get a session - session = session_pool.get_session() - else: - # determine whether to enable cluster configuration - if config['enable_cluster']: - # create cluster session connection - session = Session.init_from_node_urls( - node_urls=config['node_urls'], - user=config['username'], - password=config['password'], - connection_timeout_in_ms=connection_timeout, - ) - else: - # create stand-alone session connection - session = Session( - config['host'], - config['port'], - config['username'], - config['password'], - connection_timeout_in_ms=connection_timeout, - ) - # open session connection - session.open(False) - - check_session_validity1(session) - - if config['enable_cluster']: - # recovery session connection - session_pool.put_back(session) - # close session_pool connection - session_pool.close() - else: - # close session connection - session.close() - - -# 7、测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置 -def test_session7(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - session = Session( - host=config['host'], - port=config['port'], - user=config['username'], - password=config['password'], - use_ssl=config['use_ssl'], - ca_certs=config['ca_certs'], - ) - session.open(False) - check_session_validity1(session) - session.close() - - -# 8、测试session的get_time_zone和set_time_zone函数 -def test_session8(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - user=config['username'], - password=config['password'], - zone_id="UTC+8" - ) - session.open(False) - assert 'UTC+8' == session.get_time_zone(), "The expected anomaly is inconsistent with the actual situation, expect:Asia/Shanghai, actual:" + session.get_time_zone() - session.set_time_zone("+09:00") - assert '+09:00' == session.get_time_zone(), "The expected anomaly is inconsistent with the actual situation, expect:+09:00, actual:" + session.get_time_zone() - session.set_time_zone('America/New_York') - assert 'America/New_York' == session.get_time_zone(), "The expected anomaly is inconsistent with the actual situation, expect:America/New_York, actual:" + session.get_time_zone() - session.close() - - -# 9、测试session的 execute_statement 函数 -@pytest.mark.usefixtures('fixture_') -def test_session9(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - user=config['username'], - password=config['password'], - ) - session.open(False) - session.execute_statement("create database root.session_test1") - session_data_set = session.execute_statement("show databases", 100000) - databases = [] - while session_data_set.has_next(): - database_name = session_data_set.next().get_fields()[0].get_string_value() - databases.append(database_name) - - # 验证创建的数据库是否存在 - assert "root.session_test1" in databases, f"Expected database root.session_test1 not found. Available databases: {databases}" - session.close() - - -# 10、测试session的 execute_non_query_statement 和 execute_query_statement 函数 -@pytest.mark.usefixtures('fixture_') -def test_session10(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - user=config['username'], - password=config['password'], - ) - session.open(False) - session.execute_non_query_statement("create database root.session_test1") - session_data_set1 = session.execute_query_statement("show databases") - databases = [] - while session_data_set1.has_next(): - database_name = session_data_set1.next().get_fields()[0].get_string_value() - databases.append(database_name) - - # 验证创建的数据库是否存在 - assert "root.session_test1" in databases, f"Expected database root.session_test1 not found. Available databases: {databases}" - session.close() - - -############# 异常情况 ############# -# 1、测试session的get_time_zone和set_time_zone函数异常情况 -# def test_session_error1(): -# with open(config_path, 'r', encoding='utf-8') as file: -# config = yaml.safe_load(file) -# session = Session( -# config['host'], -# config['port'], -# user=config['username'], -# password=config['password'], -# ) -# session.open(False) -# try: -# session.set_time_zone(None) -# assert False, "The expected anomaly is inconsistent with the actual situation, expect:AssertionError" -# except Exception as e: -# assert isinstance(e, -# IoTDBConnectionException), "The expected anomaly is inconsistent with the actual situation, expect:IoTDBConnectionException, actual:" + str( -# e) -# assert 'Asia/Shanghai' == session.get_time_zone(), "The expected anomaly is inconsistent with the actual situation, expect:Asia/Shanghai" -# # session.close() # TODO:存在异常,session.set_time_zone(None)报错之后会无法关闭 session - -# 2、测试session的 execute_non_query_statement函数异常情况 -@pytest.mark.usefixtures('fixture_') -def test_session_error2(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - user=config['username'], - password=config['password'], - ) - session.open(False) - session.close() - try: - session.execute_non_query_statement("create database root.session_test1") - assert False, "The expected anomaly is inconsistent with the actual situation, expect:AssertionError" - except Exception as e: - assert isinstance(e, - IoTDBConnectionException), "The expected anomaly is inconsistent with the actual situation, expect:IoTDBConnectionException, actual:" + str( - e) - -# 3、测试session的 execute_query_statement函数异常情况 -@pytest.mark.usefixtures('fixture_') -def test_session_error3(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - user=config['username'], - password=config['password'], - ) - session.open(False) - session.close() - try: - session.execute_query_statement("show databases") - assert False, "The expected anomaly is inconsistent with the actual situation, expect:AssertionError" - except Exception as e: - assert isinstance(e, - IoTDBConnectionException), "The expected anomaly is inconsistent with the actual situation, expect:IoTDBConnectionException, actual:" + str( - e) - -# 4、测试session的 execute_statement函数异常情况 -@pytest.mark.usefixtures('fixture_') -def test_session_error4(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - user=config['username'], - password=config['password'], - ) - session.open(False) - session.close() - try: - session.execute_statement("show databases") - assert False, "The expected anomaly is inconsistent with the actual situation, expect:AssertionError" - except Exception as e: - assert isinstance(e, - IoTDBConnectionException), "The expected anomaly is inconsistent with the actual situation, expect:IoTDBConnectionException, actual:" + str( - e) - - -# 5、测试session的set_time_zone函数异常情况 -def test_session_error5(): - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - session = Session( - config['host'], - config['port'], - user=config['username'], - password=config['password'], - ) - session.open(False) - session.close() - try: - session.set_time_zone('America/New_York') - except Exception as e: - assert isinstance(e, - IoTDBConnectionException), "The expected anomaly is inconsistent with the actual situation, expect:IoTDBConnectionException, actual:" + str( - e) - +import os +from datetime import date + +import pytest +import yaml +from iotdb.Session import Session +from iotdb.SessionPool import PoolConfig, SessionPool +from iotdb.utils.IoTDBConstants import TSDataType, TSEncoding, Compressor +from iotdb.utils.Tablet import Tablet +from iotdb.utils.exception import IoTDBConnectionException + +""" + Title:测试树模型Session连接 + Describe:测试Session + Author:肖林捷 + Date:2025/03/06 +""" + +# 配置文件目录 +config_path = "../conf/config.yml" + + +# 读取配置文件 +def read_config(file_path): + with open(file_path, 'r') as file: + return yaml.safe_load(file) + + +# 验证Session有效性 +def check_session_validity1(session): + expect = 0 + actual = 0 + database_name_ = "root.test_session" + device_name_ = database_name_ + "." + "d1" + measurements_ = [ + "BOOLEAN", "INT32", "INT64", "FLOAT", "DOUBLE", "TEXT", "STRING", "BLOB", "DATE", "TS" + ] + data_type_lst_ = [ + TSDataType.BOOLEAN, + TSDataType.INT32, + TSDataType.INT64, + TSDataType.FLOAT, + TSDataType.DOUBLE, + TSDataType.TEXT, + TSDataType.STRING, + TSDataType.BLOB, + TSDataType.DATE, + TSDataType.TIMESTAMP + ] + session.set_storage_group(database_name_) + ts_path_lst_ = [device_name_ + "." + measurements_[i] for i in range(len(measurements_))] + encoding_lst_ = [TSEncoding.PLAIN for _ in range(len(measurements_))] + compressor_lst_ = [Compressor.LZ4 for _ in range(len(measurements_))] + session.create_multi_time_series( + ts_path_lst_, data_type_lst_, encoding_lst_, compressor_lst_ + ) + values_ = [] + timestamps_ = [] + for i in range(10): + values_.append([True, i * -100, i * 100, i * -0.123, i * 0.123, "text" + str(i), "string" + str(i), + ("blob" + str(i)).encode('utf-8'), date(1970, 1, 1), i * 100]) + timestamps_.append(i) + expect += 1 + + tablet_ = Tablet( + device_name_, measurements_, data_type_lst_, values_, timestamps_ + ) + session.insert_tablet(tablet_) + with session.execute_query_statement( + "select * from " + device_name_ + ) as session_data_set: + session_data_set.set_fetch_size(1024) + while session_data_set.has_next(): + session_data_set.next() + actual += 1 + + assert expect == actual, "Actual number does not match, expected:" + str(expect) + ", actual:" + str(actual) + session.delete_storage_group(database_name_) + + +# 测试 fixture:测试环境清理 +@pytest.fixture() +def fixture_(): + try: + # 读取配置文件 + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + # 建立连接 + session = Session( + config['host'], + config['port'], + config['username'], + config['password']) + session.open() + + # 清理环境 + with session.execute_query_statement("show databases") as session_data_set: + while session_data_set.has_next(): + fields = session_data_set.next().get_fields() + if str(fields[0]) != "root.__system" and str(fields[0]) != "root.__audit": + session.execute_non_query_statement("delete database " + str(fields[0])) + + # 关闭 session + session.close() + except Exception as e: + assert False, "There is an error:" + str(e) + + yield + # 用例执行完成后清理环境代码 + + try: + # 读取配置文件 + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + # 建立连接 + session = Session( + config['host'], + config['port'], + config['username'], + config['password']) + session.open() + + # 清理环境 + with session.execute_query_statement("show databases") as session_data_set: + while session_data_set.has_next(): + fields = session_data_set.next().get_fields() + if str(fields[0]) != "root.__system" and str(fields[0]) != "root.__audit": + session.execute_non_query_statement("delete database " + str(fields[0])) + + # 关闭 session + session.close() + except Exception as e: + assert False, "There is an error:" + str(e) + + +# 1、测试session连接:最简构造 +@pytest.mark.usefixtures('fixture_') +def test_session1(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + config['username'], + config['password'], + ) + session.open(False) + check_session_validity1(session) + session.close() + + +# 2、测试session连接:最繁构造 +@pytest.mark.usefixtures('fixture_') +def test_session2(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + config['username'], + config['password'], + fetch_size=5000, + zone_id='+08:00', + enable_redirection=True, + use_ssl=False, + ca_certs=None, + connection_timeout_in_ms=None + ) + session.open(False) + check_session_validity1(session) + session.close() + + +# 3、测试session连接:多次open +@pytest.mark.usefixtures('fixture_') +def test_session3(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + user=config['username'], + password=config['password'], + ) + for i in range(10): + session.open(False) + check_session_validity1(session) + session.close() + + +# 4、测试session连接:多次close +@pytest.mark.usefixtures('fixture_') +def test_session4(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + user=config['username'], + password=config['password'], + ) + session.open(False) + check_session_validity1(session) + for i in range(10): + session.close() + + +# 5、测试session连接:close后再open +@pytest.mark.usefixtures('fixture_') +def test_session5(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + user=config['username'], + password=config['password'], + ) + session.open(False) + check_session_validity1(session) + session.close() + session.open(False) + check_session_validity1(session) + session.close() + + +# 6、测试超时连接:需要手动测试,不清楚具体多久会超时 +@pytest.mark.usefixtures('fixture_') +def test_session6(): + # open and read yaml files + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + connection_timeout = None + + # determine whether to enable session pool configuration + if config['enable_session_pool']: + pool_config = PoolConfig( + node_urls=config['node_urls'], + user_name=config['username'], + password=config['password'], + connection_timeout_in_ms=connection_timeout, + ) + max_pool_size = 5 + wait_timeout_in_ms = 3000 + + # Create a session pool + session_pool = SessionPool(pool_config, max_pool_size, wait_timeout_in_ms) + + # get a session + session = session_pool.get_session() + else: + # determine whether to enable cluster configuration + if config['enable_cluster']: + # create cluster session connection + session = Session.init_from_node_urls( + node_urls=config['node_urls'], + user=config['username'], + password=config['password'], + connection_timeout_in_ms=connection_timeout, + ) + else: + # create stand-alone session connection + session = Session( + config['host'], + config['port'], + config['username'], + config['password'], + connection_timeout_in_ms=connection_timeout, + ) + # open session connection + session.open(False) + + check_session_validity1(session) + + if config['enable_cluster']: + # recovery session connection + session_pool.put_back(session) + # close session_pool connection + session_pool.close() + else: + # close session connection + session.close() + + +# 7、测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置 +def test_session7(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + session = Session( + host=config['host'], + port=config['port'], + user=config['username'], + password=config['password'], + use_ssl=config['use_ssl'], + ca_certs=config['ca_certs'], + ) + session.open(False) + check_session_validity1(session) + session.close() + + +# 8、测试session的get_time_zone和set_time_zone函数 +def test_session8(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + user=config['username'], + password=config['password'], + zone_id="UTC+8" + ) + session.open(False) + assert 'UTC+8' == session.get_time_zone(), "The expected anomaly is inconsistent with the actual situation, expect:Asia/Shanghai, actual:" + session.get_time_zone() + session.set_time_zone("+09:00") + assert '+09:00' == session.get_time_zone(), "The expected anomaly is inconsistent with the actual situation, expect:+09:00, actual:" + session.get_time_zone() + session.set_time_zone('America/New_York') + assert 'America/New_York' == session.get_time_zone(), "The expected anomaly is inconsistent with the actual situation, expect:America/New_York, actual:" + session.get_time_zone() + session.close() + + +# 9、测试session的 execute_statement 函数 +@pytest.mark.usefixtures('fixture_') +def test_session9(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + user=config['username'], + password=config['password'], + ) + session.open(False) + session.execute_statement("create database root.session_test1") + session_data_set = session.execute_statement("show databases", 100000) + databases = [] + while session_data_set.has_next(): + database_name = session_data_set.next().get_fields()[0].get_string_value() + databases.append(database_name) + + # 验证创建的数据库是否存在 + assert "root.session_test1" in databases, f"Expected database root.session_test1 not found. Available databases: {databases}" + session.close() + + +# 10、测试session的 execute_non_query_statement 和 execute_query_statement 函数 +@pytest.mark.usefixtures('fixture_') +def test_session10(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + user=config['username'], + password=config['password'], + ) + session.open(False) + session.execute_non_query_statement("create database root.session_test1") + session_data_set1 = session.execute_query_statement("show databases") + databases = [] + while session_data_set1.has_next(): + database_name = session_data_set1.next().get_fields()[0].get_string_value() + databases.append(database_name) + + # 验证创建的数据库是否存在 + assert "root.session_test1" in databases, f"Expected database root.session_test1 not found. Available databases: {databases}" + session.close() + + +############# 异常情况 ############# +# 1、测试session的get_time_zone和set_time_zone函数异常情况 +# def test_session_error1(): +# with open(config_path, 'r', encoding='utf-8') as file: +# config = yaml.safe_load(file) +# session = Session( +# config['host'], +# config['port'], +# user=config['username'], +# password=config['password'], +# ) +# session.open(False) +# try: +# session.set_time_zone(None) +# assert False, "The expected anomaly is inconsistent with the actual situation, expect:AssertionError" +# except Exception as e: +# assert isinstance(e, +# IoTDBConnectionException), "The expected anomaly is inconsistent with the actual situation, expect:IoTDBConnectionException, actual:" + str( +# e) +# assert 'Asia/Shanghai' == session.get_time_zone(), "The expected anomaly is inconsistent with the actual situation, expect:Asia/Shanghai" +# # session.close() # TODO:存在异常,session.set_time_zone(None)报错之后会无法关闭 session + +# 2、测试session的 execute_non_query_statement函数异常情况 +@pytest.mark.usefixtures('fixture_') +def test_session_error2(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + user=config['username'], + password=config['password'], + ) + session.open(False) + session.close() + try: + session.execute_non_query_statement("create database root.session_test1") + assert False, "The expected anomaly is inconsistent with the actual situation, expect:AssertionError" + except Exception as e: + assert isinstance(e, + IoTDBConnectionException), "The expected anomaly is inconsistent with the actual situation, expect:IoTDBConnectionException, actual:" + str( + e) + +# 3、测试session的 execute_query_statement函数异常情况 +@pytest.mark.usefixtures('fixture_') +def test_session_error3(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + user=config['username'], + password=config['password'], + ) + session.open(False) + session.close() + try: + session.execute_query_statement("show databases") + assert False, "The expected anomaly is inconsistent with the actual situation, expect:AssertionError" + except Exception as e: + assert isinstance(e, + IoTDBConnectionException), "The expected anomaly is inconsistent with the actual situation, expect:IoTDBConnectionException, actual:" + str( + e) + +# 4、测试session的 execute_statement函数异常情况 +@pytest.mark.usefixtures('fixture_') +def test_session_error4(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + user=config['username'], + password=config['password'], + ) + session.open(False) + session.close() + try: + session.execute_statement("show databases") + assert False, "The expected anomaly is inconsistent with the actual situation, expect:AssertionError" + except Exception as e: + assert isinstance(e, + IoTDBConnectionException), "The expected anomaly is inconsistent with the actual situation, expect:IoTDBConnectionException, actual:" + str( + e) + + +# 5、测试session的set_time_zone函数异常情况 +def test_session_error5(): + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + session = Session( + config['host'], + config['port'], + user=config['username'], + password=config['password'], + ) + session.open(False) + session.close() + try: + session.set_time_zone('America/New_York') + except Exception as e: + assert isinstance(e, + IoTDBConnectionException), "The expected anomaly is inconsistent with the actual situation, expect:IoTDBConnectionException, actual:" + str( + e) + From be584e94d7f63564f6892f970530e2e6ef0664b2 Mon Sep 17 00:00:00 2001 From: LinJieXiao-XLJ Date: Thu, 5 Nov 2026 16:12:35 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix(plm):=20=E6=9C=80=E7=AE=80=20session=5F?= =?UTF-8?q?pool=20=E7=94=A8=E4=BE=8B=E6=94=B9=E4=B8=BA=E6=98=BE=E5=BC=8F?= =?UTF-8?q?=E4=BC=A0=E9=85=8D=E7=BD=AE=E5=87=AD=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TableSessionPoolConfig() 默认 root/root,PLM TimechoDB 默认口令为 TimechoDB@2021,直接构造会 801。改为从 conf/config.yml 读取 node_urls 与 凭据,用例名同步为「最简 session_pool 连接(node_urls + 显式凭据)」。 Co-Authored-By: Claude Code --- .plm-case-defs.json | 4 +- docs/plm-case-review.md | 2 +- tests/table/test_tablemodel_session_pool.py | 862 ++++++++++---------- 3 files changed, 437 insertions(+), 431 deletions(-) diff --git a/.plm-case-defs.json b/.plm-case-defs.json index c263572..e398786 100644 --- a/.plm-case-defs.json +++ b/.plm-case-defs.json @@ -286,8 +286,8 @@ }, { "target": "table/test_tablemodel_session_pool.py::test_session1", - "name": "Python 开源|表模型-会话池:测试最简 SessionPool 连接", - "description": "测试最简 SessionPool 连接", + "name": "Python 开源|表模型-会话池:最简 session_pool 连接(node_urls + 显式凭据)", + "description": "测试最简 session_pool 连接路径:node_urls 来自配置,凭据显式传入(PLM TimechoDB 默认口令非 root/root)。", "priority": "P1", "caseType": "功能测试", "model": "表模型", diff --git a/docs/plm-case-review.md b/docs/plm-case-review.md index 4f87a3c..501db0b 100644 --- a/docs/plm-case-review.md +++ b/docs/plm-case-review.md @@ -106,5 +106,5 @@ - 111 报告 88/88 通过,作为基线。 - 依赖版本:111 为 Python 3.10 + numpy 1.25.2 / pandas 2.0.3 / greenlet 2.0.2;76 为 Python 3.12,上述版本无 cp312 wheel,改用兼容的 numpy 1.26.4 / pandas 2.1.4 / greenlet 3.0.3,并以 88 条实跑结果为准。客户端 apache-iotdb 2.0.11(PLM 分支默认)。 - 本轮无命名分歧;如后续发现用例名与测试内容不符,在本文件追加“待审查”记录。 -- 环境差异记录:111 为开源版默认 root/root;PLM 的 TimechoDB 实例默认口令为 TimechoDB@2021。`tree/test_treemodel_session.py::test_session1` 原用 2 参构造(默认 root/root)会 801,已改为显式传 config 凭据,用例名同步改为“最简 session 连接(host/port + 显式凭据)”。 +- 环境差异记录:111 为开源版默认 root/root;PLM 的 TimechoDB 实例默认口令为 TimechoDB@2021。`tree/test_treemodel_session.py::test_session1` 原用 2 参构造(默认 root/root)会 801,已改为显式传 config 凭据,用例名同步改为“最简 session 连接(host/port + 显式凭据)”;`table/test_tablemodel_session_pool.py::test_session1` 同理改为显式传 node_urls/凭据。 diff --git a/tests/table/test_tablemodel_session_pool.py b/tests/table/test_tablemodel_session_pool.py index 0e81f42..a95a436 100644 --- a/tests/table/test_tablemodel_session_pool.py +++ b/tests/table/test_tablemodel_session_pool.py @@ -1,428 +1,434 @@ -import numpy as np -import pytest -import yaml -import os -from datetime import date -from iotdb.table_session import TableSession, TableSessionConfig -from iotdb.Session import Session -from iotdb.SessionPool import SessionPool, PoolConfig -from iotdb.table_session_pool import TableSessionPool, TableSessionPoolConfig -from iotdb.utils.BitMap import BitMap -from iotdb.utils.IoTDBConstants import TSDataType -from iotdb.utils.Tablet import Tablet, ColumnType -from iotdb.utils.NumpyTablet import NumpyTablet -from datetime import date - -from iotdb.utils.exception import IoTDBConnectionException - -""" - Title:测试表模型SessionPool连接接口 - Describe:测试SessionPool连接接口及其参数 - Author:肖林捷 - Date:2025/8/1 -""" - -config_path = "../conf/config.yml" - -# 读取配置文件 -def read_config(file_path): - with open(file_path, 'r') as file: - return yaml.safe_load(file) - - -# 验证Session有效性 -def check_session_validity1(session): - expect = 0 - actual = 0 - database_name = "test_tablemodel_session" - table_name = "table1" - session.execute_non_query_statement("create database " + database_name) - session.execute_non_query_statement("use " + database_name) - session.execute_non_query_statement( - "create table " + table_name + "(" - 'id1 STRING TAG, id2 STRING TAG, id3 STRING TAG, ' - 'attr1 string attribute, attr2 string attribute, attr3 string attribute,' - 'BOOLEAN BOOLEAN FIELD, INT32 INT32 FIELD, INT64 INT64 FIELD, FLOAT FLOAT FIELD, DOUBLE DOUBLE FIELD,' - 'TEXT TEXT FIELD, TIMESTAMP TIMESTAMP FIELD, DATE DATE FIELD, BLOB BLOB FIELD, STRING STRING FIELD)' - ) - column_names = [ - "id1", "id2", "id3", - "attr1", "attr2", "attr3", - "BOOLEAN", "INT32", "INT64", "FLOAT", "DOUBLE", "TEXT", "TIMESTAMP", "DATE", "BLOB", "STRING"] - data_types = [ - TSDataType.STRING, TSDataType.STRING, TSDataType.STRING, - TSDataType.STRING, TSDataType.STRING, TSDataType.STRING, - TSDataType.BOOLEAN, TSDataType.INT32, TSDataType.INT64, TSDataType.FLOAT, TSDataType.DOUBLE, - TSDataType.TEXT, - TSDataType.TIMESTAMP, TSDataType.DATE, TSDataType.BLOB, TSDataType.STRING] - column_types = [ - ColumnType.TAG, ColumnType.TAG, ColumnType.TAG, - ColumnType.ATTRIBUTE, ColumnType.ATTRIBUTE, ColumnType.ATTRIBUTE, - ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, - ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD] - timestamps = [] - values = [] - for row in range(10): - timestamps.append(row) - values.append([ - "id1:" + str(row), "id2:" + str(row), "id3:" + str(row), - "attr1:" + str(row), "attr2:" + str(row), "attr3:" + str(row), - False, 0, 0, 0.0, 0.0, "1234567890", 0, date(1970, 1, 1), '1234567890'.encode('utf-8'), "1234567890"]) - expect = expect + 1 - - tablet = Tablet(table_name, column_names, data_types, values, timestamps, column_types) - session.insert(tablet) - with session.execute_query_statement("select * from " + table_name + " order by time") as session_data_set: - while session_data_set.has_next(): - session_data_set.next() - actual = actual + 1 - - assert expect == actual, "期待数量和实际数量不一致,期待:" + str(expect) + ",实际:" + str(actual) - session.execute_non_query_statement("drop database " + database_name) - - -# 验证Session有效性:session已经指定数据库 -def check_session_validity2(session, database_name): - expect = 0 - actual = 0 - table_name = "table1" - session.execute_non_query_statement("create database " + database_name) - # session.execute_non_query_statement("use " + database_name) - session.execute_non_query_statement( - "create table " + table_name + "(" - 'id1 STRING TAG, id2 STRING TAG, id3 STRING TAG, ' - 'attr1 string attribute, attr2 string attribute, attr3 string attribute,' - 'BOOLEAN BOOLEAN FIELD, INT32 INT32 FIELD, INT64 INT64 FIELD, FLOAT FLOAT FIELD, DOUBLE DOUBLE FIELD,' - 'TEXT TEXT FIELD, TIMESTAMP TIMESTAMP FIELD, DATE DATE FIELD, BLOB BLOB FIELD, STRING STRING FIELD)' - ) - column_names = [ - "id1", "id2", "id3", - "attr1", "attr2", "attr3", - "BOOLEAN", "INT32", "INT64", "FLOAT", "DOUBLE", "TEXT", "TIMESTAMP", "DATE", "BLOB", "STRING"] - data_types = [ - TSDataType.STRING, TSDataType.STRING, TSDataType.STRING, - TSDataType.STRING, TSDataType.STRING, TSDataType.STRING, - TSDataType.BOOLEAN, TSDataType.INT32, TSDataType.INT64, TSDataType.FLOAT, TSDataType.DOUBLE, - TSDataType.TEXT, - TSDataType.TIMESTAMP, TSDataType.DATE, TSDataType.BLOB, TSDataType.STRING] - column_types = [ - ColumnType.TAG, ColumnType.TAG, ColumnType.TAG, - ColumnType.ATTRIBUTE, ColumnType.ATTRIBUTE, ColumnType.ATTRIBUTE, - ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, - ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD] - timestamps = [] - values = [] - for row in range(10): - timestamps.append(row) - values.append([ - "id1:" + str(row), "id2:" + str(row), "id3:" + str(row), - "attr1:" + str(row), "attr2:" + str(row), "attr3:" + str(row), - False, 0, 0, 0.0, 0.0, "1234567890", 0, date(1970, 1, 1), '1234567890'.encode('utf-8'), "1234567890"]) - expect = expect + 1 - - tablet = Tablet(table_name, column_names, data_types, values, timestamps, column_types) - session.insert(tablet) - with session.execute_query_statement("select * from " + table_name + " order by time") as session_data_set: - while session_data_set.has_next(): - session_data_set.next() - actual = actual + 1 - - assert expect == actual, "期待数量和实际数量不一致,期待:" + str(expect) + ",实际:" + str(actual) - session.execute_non_query_statement("drop database " + database_name) - - -# 测试 fixture:测试环境清理 -@pytest.fixture() -def fixture_(): - yield - # 用例执行完成后清理环境代码 - - try: - # 读取配置文件 - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - config = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - ) - session_pool = TableSessionPool(config) - session = session_pool.get_session() - - # 清理环境 - with session.execute_query_statement("show databases") as session_data_set: - while session_data_set.has_next(): - fields = session_data_set.next().get_fields() - if str(fields[0]) != "information_schema": - session.execute_non_query_statement("drop database " + str(fields[0])) - - # 关闭 session 和 session_pool - session.close() - session_pool.close() - except Exception as e: - print(e) - - -# 1、测试最简 SessionPool 连接 -@pytest.mark.usefixtures('fixture_') -def test_session1(): - config = TableSessionPoolConfig() - session_pool = TableSessionPool(config) - session = session_pool.get_session() - check_session_validity1(session) - session.close() - session_pool.close() - - -# 2、测试最全 session 连接:session指定数据库 -@pytest.mark.usefixtures('fixture_') -def test_session2(): - # 读取配置文件 - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - database_name = "test_session2" - - config = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - database=database_name, - fetch_size=5000, - time_zone=Session.DEFAULT_ZONE_ID, - enable_redirection=True, - enable_compression=False, - use_ssl=False, - ca_certs=None, - connection_timeout_in_ms=None, - max_pool_size=5, - wait_timeout_in_ms=10000, - max_retry=3 - ) - session_pool = TableSessionPool(config) - session = session_pool.get_session() - check_session_validity2(session, database_name) - session.close() - session_pool.close() - - -# 3、测试 enable_redirection 参数:关闭重定向 -@pytest.mark.usefixtures('fixture_') -def test_session3(): - # 读取配置文件 - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - config = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - enable_redirection=False, - ) - session_pool = TableSessionPool(config) - session = session_pool.get_session() - check_session_validity1(session) - session.close() - session_pool.close() - - -# 4、测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置) -@pytest.mark.usefixtures('fixture_') -def test_session4(): - # 读取配置文件 - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - config = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - enable_compression=config['enable_compression'] - ) - session_pool = TableSessionPool(config) - session = session_pool.get_session() - check_session_validity1(session) - session.close() - session_pool.close() - - -# 5、测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥) -@pytest.mark.usefixtures('fixture_') -def test_session5(): - # 读取配置文件 - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - config = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - use_ssl=config['use_ssl'], - ca_certs=config['ca_certs'] - ) - session_pool = TableSessionPool(config) - session = session_pool.get_session() - check_session_validity1(session) - session.close() - session_pool.close() - - -# 6、测试 connection_timeout_in_ms 参数 -@pytest.mark.usefixtures('fixture_') -def test_session6(): - # 读取配置文件 - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - config = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - connection_timeout_in_ms=config['connection_timeout_in_ms'], - ) - try: - session_pool = TableSessionPool(config) - session = session_pool.get_session() - check_session_validity1(session) - session.close() - session_pool.close() - except Exception as e: - assert isinstance(e, IoTDBConnectionException) and "read timeout" in str( - e), "期望报错信息与实际不一致,期待:IoTDBConnectionException异常且包含'read timeout'信息,实际:" + str(e) - -# # 7、测试多次 Close:session.close超过10次则会卡住 -# @pytest.mark.usefixtures('fixture_') -# def test_session7(): -# # 读取配置文件 -# with open(config_path, 'r', encoding='utf-8') as file: -# config = yaml.safe_load(file) -# -# config = TableSessionPoolConfig( -# node_urls=config['node_urls'], -# username=config['username'], -# password=config['password'] -# ) -# session_pool = TableSessionPool(config) -# session = session_pool.get_session() -# check_session_validity1(session) -# # 关闭 session -# for i in range(2): -# session.close() -# -# session_pool.close() - -# 8、测试 max_retry 参数:0, 1, 100, 10000 -@pytest.mark.usefixtures('fixture_') -def test_session8(): - # 读取配置文件 - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - config1 = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - max_retry=0 - ) - session_pool1 = TableSessionPool(config1) - session1 = session_pool1.get_session() - check_session_validity1(session1) - session1.close() - session_pool1.close() - - config2 = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - max_retry=1 - ) - session_pool2 = TableSessionPool(config2) - session2 = session_pool2.get_session() - check_session_validity1(session2) - session2.close() - session_pool2.close() - - config3 = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - max_retry=100 - ) - session_pool3 = TableSessionPool(config3) - session3 = session_pool3.get_session() - check_session_validity1(session3) - session3.close() - session_pool3.close() - - config4 = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - max_retry=10000 - ) - session_pool4 = TableSessionPool(config4) - session4 = session_pool4.get_session() - check_session_validity1(session4) - session4.close() - session_pool4.close() - -# 9、测试 max_pool_size 参数:0, 1, 100, 10000 -@pytest.mark.usefixtures('fixture_') -def test_session9(): - # 读取配置文件 - with open(config_path, 'r', encoding='utf-8') as file: - config = yaml.safe_load(file) - - config1 = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - max_pool_size=0 - ) - try: - session_pool1 = TableSessionPool(config1) - session1 = session_pool1.get_session() - check_session_validity1(session1) - session1.close() - session_pool1.close() - except Exception as e: - assert "Wait to get session timeout in SessionPool, current pool size: 0" in str(e), f"期望报错信息与实际不一致,期待包含: Wait to get session timeout in SessionPool, current pool size: 0, 实际: {str(e)}" - - config2 = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - max_pool_size=1 - ) - session_pool2 = TableSessionPool(config2) - session2 = session_pool2.get_session() - check_session_validity1(session2) - session2.close() - session_pool2.close() - - config3 = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - max_pool_size=100 - ) - session_pool3 = TableSessionPool(config3) - session3 = session_pool3.get_session() - check_session_validity1(session3) - session3.close() - session_pool3.close() - - config4 = TableSessionPoolConfig( - node_urls=config['node_urls'], - username=config['username'], - password=config['password'], - max_pool_size=10000 - ) - session_pool4 = TableSessionPool(config4) - session4 = session_pool4.get_session() - check_session_validity1(session4) - session4.close() - session_pool4.close() - - +import numpy as np +import pytest +import yaml +import os +from datetime import date +from iotdb.table_session import TableSession, TableSessionConfig +from iotdb.Session import Session +from iotdb.SessionPool import SessionPool, PoolConfig +from iotdb.table_session_pool import TableSessionPool, TableSessionPoolConfig +from iotdb.utils.BitMap import BitMap +from iotdb.utils.IoTDBConstants import TSDataType +from iotdb.utils.Tablet import Tablet, ColumnType +from iotdb.utils.NumpyTablet import NumpyTablet +from datetime import date + +from iotdb.utils.exception import IoTDBConnectionException + +""" + Title:测试表模型SessionPool连接接口 + Describe:测试SessionPool连接接口及其参数 + Author:肖林捷 + Date:2025/8/1 +""" + +config_path = "../conf/config.yml" + +# 读取配置文件 +def read_config(file_path): + with open(file_path, 'r') as file: + return yaml.safe_load(file) + + +# 验证Session有效性 +def check_session_validity1(session): + expect = 0 + actual = 0 + database_name = "test_tablemodel_session" + table_name = "table1" + session.execute_non_query_statement("create database " + database_name) + session.execute_non_query_statement("use " + database_name) + session.execute_non_query_statement( + "create table " + table_name + "(" + 'id1 STRING TAG, id2 STRING TAG, id3 STRING TAG, ' + 'attr1 string attribute, attr2 string attribute, attr3 string attribute,' + 'BOOLEAN BOOLEAN FIELD, INT32 INT32 FIELD, INT64 INT64 FIELD, FLOAT FLOAT FIELD, DOUBLE DOUBLE FIELD,' + 'TEXT TEXT FIELD, TIMESTAMP TIMESTAMP FIELD, DATE DATE FIELD, BLOB BLOB FIELD, STRING STRING FIELD)' + ) + column_names = [ + "id1", "id2", "id3", + "attr1", "attr2", "attr3", + "BOOLEAN", "INT32", "INT64", "FLOAT", "DOUBLE", "TEXT", "TIMESTAMP", "DATE", "BLOB", "STRING"] + data_types = [ + TSDataType.STRING, TSDataType.STRING, TSDataType.STRING, + TSDataType.STRING, TSDataType.STRING, TSDataType.STRING, + TSDataType.BOOLEAN, TSDataType.INT32, TSDataType.INT64, TSDataType.FLOAT, TSDataType.DOUBLE, + TSDataType.TEXT, + TSDataType.TIMESTAMP, TSDataType.DATE, TSDataType.BLOB, TSDataType.STRING] + column_types = [ + ColumnType.TAG, ColumnType.TAG, ColumnType.TAG, + ColumnType.ATTRIBUTE, ColumnType.ATTRIBUTE, ColumnType.ATTRIBUTE, + ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, + ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD] + timestamps = [] + values = [] + for row in range(10): + timestamps.append(row) + values.append([ + "id1:" + str(row), "id2:" + str(row), "id3:" + str(row), + "attr1:" + str(row), "attr2:" + str(row), "attr3:" + str(row), + False, 0, 0, 0.0, 0.0, "1234567890", 0, date(1970, 1, 1), '1234567890'.encode('utf-8'), "1234567890"]) + expect = expect + 1 + + tablet = Tablet(table_name, column_names, data_types, values, timestamps, column_types) + session.insert(tablet) + with session.execute_query_statement("select * from " + table_name + " order by time") as session_data_set: + while session_data_set.has_next(): + session_data_set.next() + actual = actual + 1 + + assert expect == actual, "期待数量和实际数量不一致,期待:" + str(expect) + ",实际:" + str(actual) + session.execute_non_query_statement("drop database " + database_name) + + +# 验证Session有效性:session已经指定数据库 +def check_session_validity2(session, database_name): + expect = 0 + actual = 0 + table_name = "table1" + session.execute_non_query_statement("create database " + database_name) + # session.execute_non_query_statement("use " + database_name) + session.execute_non_query_statement( + "create table " + table_name + "(" + 'id1 STRING TAG, id2 STRING TAG, id3 STRING TAG, ' + 'attr1 string attribute, attr2 string attribute, attr3 string attribute,' + 'BOOLEAN BOOLEAN FIELD, INT32 INT32 FIELD, INT64 INT64 FIELD, FLOAT FLOAT FIELD, DOUBLE DOUBLE FIELD,' + 'TEXT TEXT FIELD, TIMESTAMP TIMESTAMP FIELD, DATE DATE FIELD, BLOB BLOB FIELD, STRING STRING FIELD)' + ) + column_names = [ + "id1", "id2", "id3", + "attr1", "attr2", "attr3", + "BOOLEAN", "INT32", "INT64", "FLOAT", "DOUBLE", "TEXT", "TIMESTAMP", "DATE", "BLOB", "STRING"] + data_types = [ + TSDataType.STRING, TSDataType.STRING, TSDataType.STRING, + TSDataType.STRING, TSDataType.STRING, TSDataType.STRING, + TSDataType.BOOLEAN, TSDataType.INT32, TSDataType.INT64, TSDataType.FLOAT, TSDataType.DOUBLE, + TSDataType.TEXT, + TSDataType.TIMESTAMP, TSDataType.DATE, TSDataType.BLOB, TSDataType.STRING] + column_types = [ + ColumnType.TAG, ColumnType.TAG, ColumnType.TAG, + ColumnType.ATTRIBUTE, ColumnType.ATTRIBUTE, ColumnType.ATTRIBUTE, + ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, + ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD, ColumnType.FIELD] + timestamps = [] + values = [] + for row in range(10): + timestamps.append(row) + values.append([ + "id1:" + str(row), "id2:" + str(row), "id3:" + str(row), + "attr1:" + str(row), "attr2:" + str(row), "attr3:" + str(row), + False, 0, 0, 0.0, 0.0, "1234567890", 0, date(1970, 1, 1), '1234567890'.encode('utf-8'), "1234567890"]) + expect = expect + 1 + + tablet = Tablet(table_name, column_names, data_types, values, timestamps, column_types) + session.insert(tablet) + with session.execute_query_statement("select * from " + table_name + " order by time") as session_data_set: + while session_data_set.has_next(): + session_data_set.next() + actual = actual + 1 + + assert expect == actual, "期待数量和实际数量不一致,期待:" + str(expect) + ",实际:" + str(actual) + session.execute_non_query_statement("drop database " + database_name) + + +# 测试 fixture:测试环境清理 +@pytest.fixture() +def fixture_(): + yield + # 用例执行完成后清理环境代码 + + try: + # 读取配置文件 + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + config = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + ) + session_pool = TableSessionPool(config) + session = session_pool.get_session() + + # 清理环境 + with session.execute_query_statement("show databases") as session_data_set: + while session_data_set.has_next(): + fields = session_data_set.next().get_fields() + if str(fields[0]) != "information_schema": + session.execute_non_query_statement("drop database " + str(fields[0])) + + # 关闭 session 和 session_pool + session.close() + session_pool.close() + except Exception as e: + print(e) + + +# 1、测试最简 SessionPool 连接 +@pytest.mark.usefixtures('fixture_') +def test_session1(): + with open(config_path, 'r', encoding='utf-8') as file: + cfg = yaml.safe_load(file) + config = TableSessionPoolConfig( + node_urls=cfg['node_urls'], + username=cfg['username'], + password=cfg['password'], + ) + session_pool = TableSessionPool(config) + session = session_pool.get_session() + check_session_validity1(session) + session.close() + session_pool.close() + + +# 2、测试最全 session 连接:session指定数据库 +@pytest.mark.usefixtures('fixture_') +def test_session2(): + # 读取配置文件 + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + database_name = "test_session2" + + config = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + database=database_name, + fetch_size=5000, + time_zone=Session.DEFAULT_ZONE_ID, + enable_redirection=True, + enable_compression=False, + use_ssl=False, + ca_certs=None, + connection_timeout_in_ms=None, + max_pool_size=5, + wait_timeout_in_ms=10000, + max_retry=3 + ) + session_pool = TableSessionPool(config) + session = session_pool.get_session() + check_session_validity2(session, database_name) + session.close() + session_pool.close() + + +# 3、测试 enable_redirection 参数:关闭重定向 +@pytest.mark.usefixtures('fixture_') +def test_session3(): + # 读取配置文件 + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + config = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + enable_redirection=False, + ) + session_pool = TableSessionPool(config) + session = session_pool.get_session() + check_session_validity1(session) + session.close() + session_pool.close() + + +# 4、测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置) +@pytest.mark.usefixtures('fixture_') +def test_session4(): + # 读取配置文件 + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + config = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + enable_compression=config['enable_compression'] + ) + session_pool = TableSessionPool(config) + session = session_pool.get_session() + check_session_validity1(session) + session.close() + session_pool.close() + + +# 5、测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥) +@pytest.mark.usefixtures('fixture_') +def test_session5(): + # 读取配置文件 + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + config = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + use_ssl=config['use_ssl'], + ca_certs=config['ca_certs'] + ) + session_pool = TableSessionPool(config) + session = session_pool.get_session() + check_session_validity1(session) + session.close() + session_pool.close() + + +# 6、测试 connection_timeout_in_ms 参数 +@pytest.mark.usefixtures('fixture_') +def test_session6(): + # 读取配置文件 + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + config = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + connection_timeout_in_ms=config['connection_timeout_in_ms'], + ) + try: + session_pool = TableSessionPool(config) + session = session_pool.get_session() + check_session_validity1(session) + session.close() + session_pool.close() + except Exception as e: + assert isinstance(e, IoTDBConnectionException) and "read timeout" in str( + e), "期望报错信息与实际不一致,期待:IoTDBConnectionException异常且包含'read timeout'信息,实际:" + str(e) + +# # 7、测试多次 Close:session.close超过10次则会卡住 +# @pytest.mark.usefixtures('fixture_') +# def test_session7(): +# # 读取配置文件 +# with open(config_path, 'r', encoding='utf-8') as file: +# config = yaml.safe_load(file) +# +# config = TableSessionPoolConfig( +# node_urls=config['node_urls'], +# username=config['username'], +# password=config['password'] +# ) +# session_pool = TableSessionPool(config) +# session = session_pool.get_session() +# check_session_validity1(session) +# # 关闭 session +# for i in range(2): +# session.close() +# +# session_pool.close() + +# 8、测试 max_retry 参数:0, 1, 100, 10000 +@pytest.mark.usefixtures('fixture_') +def test_session8(): + # 读取配置文件 + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + config1 = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + max_retry=0 + ) + session_pool1 = TableSessionPool(config1) + session1 = session_pool1.get_session() + check_session_validity1(session1) + session1.close() + session_pool1.close() + + config2 = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + max_retry=1 + ) + session_pool2 = TableSessionPool(config2) + session2 = session_pool2.get_session() + check_session_validity1(session2) + session2.close() + session_pool2.close() + + config3 = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + max_retry=100 + ) + session_pool3 = TableSessionPool(config3) + session3 = session_pool3.get_session() + check_session_validity1(session3) + session3.close() + session_pool3.close() + + config4 = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + max_retry=10000 + ) + session_pool4 = TableSessionPool(config4) + session4 = session_pool4.get_session() + check_session_validity1(session4) + session4.close() + session_pool4.close() + +# 9、测试 max_pool_size 参数:0, 1, 100, 10000 +@pytest.mark.usefixtures('fixture_') +def test_session9(): + # 读取配置文件 + with open(config_path, 'r', encoding='utf-8') as file: + config = yaml.safe_load(file) + + config1 = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + max_pool_size=0 + ) + try: + session_pool1 = TableSessionPool(config1) + session1 = session_pool1.get_session() + check_session_validity1(session1) + session1.close() + session_pool1.close() + except Exception as e: + assert "Wait to get session timeout in SessionPool, current pool size: 0" in str(e), f"期望报错信息与实际不一致,期待包含: Wait to get session timeout in SessionPool, current pool size: 0, 实际: {str(e)}" + + config2 = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + max_pool_size=1 + ) + session_pool2 = TableSessionPool(config2) + session2 = session_pool2.get_session() + check_session_validity1(session2) + session2.close() + session_pool2.close() + + config3 = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + max_pool_size=100 + ) + session_pool3 = TableSessionPool(config3) + session3 = session_pool3.get_session() + check_session_validity1(session3) + session3.close() + session_pool3.close() + + config4 = TableSessionPoolConfig( + node_urls=config['node_urls'], + username=config['username'], + password=config['password'], + max_pool_size=10000 + ) + session_pool4 = TableSessionPool(config4) + session4 = session_pool4.get_session() + check_session_validity1(session4) + session4.close() + session_pool4.close() + + From 7d175d17971de730c34d7c4b085426635f02d018 Mon Sep 17 00:00:00 2001 From: LinJieXiao-XLJ Date: Thu, 5 Nov 2026 16:16:55 +0800 Subject: [PATCH 5/7] =?UTF-8?q?feat(plm):=20=E5=9B=9E=E5=A1=AB=20Python=20?= =?UTF-8?q?=E5=8E=9F=E7=94=9F=E6=8E=A5=E5=8F=A3=2088=20=E6=9D=A1=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 导入 PLM 后回填 TimechoDB-3127 ~ TimechoDB-3214,并写入映射三件套, 供 start.sh case/lookup 按 PLM 编号执行。 Co-Authored-By: Claude Code --- .plm-case-defs.json | 2312 ++++++++++++++++++++++------------------- .plm-case-id-map.json | 359 +++++++ .plm-case-info.json | 530 ++++++++++ .plm-cn-names.json | 90 ++ 4 files changed, 2223 insertions(+), 1068 deletions(-) create mode 100644 .plm-case-id-map.json create mode 100644 .plm-case-info.json create mode 100644 .plm-cn-names.json diff --git a/.plm-case-defs.json b/.plm-case-defs.json index e398786..18a96cf 100644 --- a/.plm-case-defs.json +++ b/.plm-case-defs.json @@ -1,1068 +1,1244 @@ -{ - "productId": 1, - "defaults": { - "caseType": "功能测试", - "model": "通用", - "owner": "肖林捷", - "automationType": "session-python", - "executeMethod": "自动" - }, - "cases": [ - { - "target": "table/test_tablemodel_insert.py::test_insert1", - "name": "Python 开源|表模型-写入:测试一般写入数据", - "description": "测试一般写入数据", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-写入" - ] - }, - { - "target": "table/test_tablemodel_insert.py::test_insert2", - "name": "Python 开源|表模型-写入:测试Numpy_tablet写入数据", - "description": "测试Numpy_tablet写入数据", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-写入" - ] - }, - { - "target": "table/test_tablemodel_insert.py::test_insert3", - "name": "Python 开源|表模型-写入:测试直接写入数据", - "description": "测试直接写入数据", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-写入" - ] - }, - { - "target": "table/test_tablemodel_insert.py::test_insert4", - "name": "Python 开源|表模型-写入:乱序写入:测试时间戳自动排序功能", - "description": "乱序写入:测试时间戳自动排序功能", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-写入" - ] - }, - { - "target": "table/test_tablemodel_insert.py::test_insert_error1", - "name": "Python 开源|表模型-写入:错误情况:时间戳长度和值长度不一致", - "description": "错误情况:时间戳长度和值长度不一致", - "priority": "P2", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-写入" - ] - }, - { - "target": "table/test_tablemodel_query.py::test_query1", - "name": "Python 开源|表模型-查询:测试SessionDataSet:验证列类型和数据类型以及行数的正确性", - "description": "测试SessionDataSet:验证列类型和数据类型以及行数的正确性", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-查询" - ] - }, - { - "target": "table/test_tablemodel_query.py::test_query2", - "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时", - "description": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-查询" - ] - }, - { - "target": "table/test_tablemodel_query.py::test_query3", - "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时", - "description": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-查询" - ] - }, - { - "target": "table/test_tablemodel_query.py::test_query4", - "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时", - "description": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-查询" - ] - }, - { - "target": "table/test_tablemodel_query.py::test_query5", - "name": "Python 开源|表模型-查询:测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000", - "description": "测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000", - "priority": "P2", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-查询" - ] - }, - { - "target": "table/test_tablemodel_query.py::test_fields1", - "name": "Python 开源|表模型-查询:测试fields查询:验证类型", - "description": "测试fields查询:验证类型", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-查询" - ] - }, - { - "target": "table/test_tablemodel_query.py::test_fields2", - "name": "Python 开源|表模型-查询:测试fields查询:验证字段值", - "description": "测试fields查询:验证字段值", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-查询" - ] - }, - { - "target": "table/test_tablemodel_query.py::test_fields3", - "name": "Python 开源|表模型-查询:测试fields查询:测试is_null、copy和set_xxx_value等方法有效性", - "description": "测试fields查询:测试is_null、copy和set_xxx_value等方法有效性", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-查询" - ] - }, - { - "target": "table/test_tablemodel_query.py::test_fields_error1", - "name": "Python 开源|表模型-查询:测试fields查询, get_XXX_valu e异常情况", - "description": "测试fields查询, get_XXX_valu e异常情况", - "priority": "P2", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-查询" - ] - }, - { - "target": "table/test_tablemodel_query.py::test_query_error1", - "name": "Python 开源|表模型-查询:测试 StatementExecutionException 异常", - "description": "测试 StatementExecutionException 异常", - "priority": "P2", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-查询" - ] - }, - { - "target": "table/test_tablemodel_session.py::test_session1", - "name": "Python 开源|表模型-会话:测试最简 session 连接:默认url地址为localhost:6667", - "description": "测试最简 session 连接:默认url地址为localhost:6667", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话" - ] - }, - { - "target": "table/test_tablemodel_session.py::test_session2", - "name": "Python 开源|表模型-会话:测试最全 session 连接:session指定数据库", - "description": "测试最全 session 连接:session指定数据库", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话" - ] - }, - { - "target": "table/test_tablemodel_session.py::test_session3", - "name": "Python 开源|表模型-会话:测试 enable_redirection 参数:关闭重定向", - "description": "测试 enable_redirection 参数:关闭重定向", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话" - ] - }, - { - "target": "table/test_tablemodel_session.py::test_session4", - "name": "Python 开源|表模型-会话:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", - "description": "测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话" - ] - }, - { - "target": "table/test_tablemodel_session.py::test_session5", - "name": "Python 开源|表模型-会话:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", - "description": "测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话" - ] - }, - { - "target": "table/test_tablemodel_session.py::test_session6", - "name": "Python 开源|表模型-会话:测试 connection_timeout_in_ms 参数", - "description": "测试 connection_timeout_in_ms 参数", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话" - ] - }, - { - "target": "table/test_tablemodel_session.py::test_session7", - "name": "Python 开源|表模型-会话:测试多次 Close", - "description": "测试多次 Close", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话" - ] - }, - { - "target": "table/test_tablemodel_session.py::test_session_error1", - "name": "Python 开源|表模型-会话:IoTDBConnectionException异常:未实现", - "description": "IoTDBConnectionException异常:未实现", - "priority": "P2", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话" - ] - }, - { - "target": "table/test_tablemodel_session_pool.py::test_session1", - "name": "Python 开源|表模型-会话池:最简 session_pool 连接(node_urls + 显式凭据)", - "description": "测试最简 session_pool 连接路径:node_urls 来自配置,凭据显式传入(PLM TimechoDB 默认口令非 root/root)。", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话池" - ] - }, - { - "target": "table/test_tablemodel_session_pool.py::test_session2", - "name": "Python 开源|表模型-会话池:测试最全 session 连接:session指定数据库", - "description": "测试最全 session 连接:session指定数据库", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话池" - ] - }, - { - "target": "table/test_tablemodel_session_pool.py::test_session3", - "name": "Python 开源|表模型-会话池:测试 enable_redirection 参数:关闭重定向", - "description": "测试 enable_redirection 参数:关闭重定向", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话池" - ] - }, - { - "target": "table/test_tablemodel_session_pool.py::test_session4", - "name": "Python 开源|表模型-会话池:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", - "description": "测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话池" - ] - }, - { - "target": "table/test_tablemodel_session_pool.py::test_session5", - "name": "Python 开源|表模型-会话池:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", - "description": "测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话池" - ] - }, - { - "target": "table/test_tablemodel_session_pool.py::test_session6", - "name": "Python 开源|表模型-会话池:测试 connection_timeout_in_ms 参数", - "description": "测试 connection_timeout_in_ms 参数", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话池" - ] - }, - { - "target": "table/test_tablemodel_session_pool.py::test_session8", - "name": "Python 开源|表模型-会话池:测试 max_retry 参数:0, 1, 100, 10000", - "description": "测试 max_retry 参数:0, 1, 100, 10000", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话池" - ] - }, - { - "target": "table/test_tablemodel_session_pool.py::test_session9", - "name": "Python 开源|表模型-会话池:测试 max_pool_size 参数:0, 1, 100, 10000", - "description": "测试 max_pool_size 参数:0, 1, 100, 10000", - "priority": "P1", - "caseType": "功能测试", - "model": "表模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/表模型-会话池" - ] - }, - { - "target": "tree/test_treemodel_database.py::test_database1", - "name": "Python 开源|树模型-数据库:测试创建数据库:set_storage_group", - "description": "测试创建数据库:set_storage_group", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-数据库" - ] - }, - { - "target": "tree/test_treemodel_database.py::test_database2", - "name": "Python 开源|树模型-数据库:测试删除数据库:delete_storage_group 和 delete_storage_groups", - "description": "测试删除数据库:delete_storage_group 和 delete_storage_groups", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-数据库" - ] - }, - { - "target": "tree/test_treemodel_database.py::test_database_error1", - "name": "Python 开源|树模型-数据库:测试delete_storage_group异常:未创建连接而执行或执行时session重连", - "description": "测试delete_storage_group异常:未创建连接而执行或执行时session重连", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-数据库" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_tablet", - "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入一条 tablet 数据", - "description": "测试往非对齐时间序列写入一条 tablet 数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_aligned_tablet", - "name": "Python 开源|树模型-写入:测试往对齐时间序列写入一条 tablet 数据", - "description": "测试往对齐时间序列写入一条 tablet 数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_tablets", - "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入多条 tablet 数据", - "description": "测试往非对齐时间序列写入多条 tablet 数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_aligned_tablets", - "name": "Python 开源|树模型-写入:测试往对齐时间序列写入多条 tablet 数据", - "description": "测试往对齐时间序列写入多条 tablet 数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_record", - "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入一条 Record 数据", - "description": "测试往非对齐时间序列写入一条 Record 数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_aligned_record", - "name": "Python 开源|树模型-写入:测试往对齐时间序列写入一条 Record 数据", - "description": "测试往对齐时间序列写入一条 Record 数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_records", - "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入多条 Record 数据", - "description": "测试往非对齐时间序列写入多条 Record 数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_aligned_records", - "name": "Python 开源|树模型-写入:测试往对齐时间序列写入多条 Record 数据", - "description": "测试往对齐时间序列写入多条 Record 数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_records_of_one_device", - "name": "Python 开源|树模型-写入:测试插入同属于一个非对齐 device 的多个 Record 数据", - "description": "测试插入同属于一个非对齐 device 的多个 Record 数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_aligned_records_of_one_device", - "name": "Python 开源|树模型-写入:测试插入同属于一个对齐 device 的多个 Record 数据", - "description": "测试插入同属于一个对齐 device 的多个 Record 数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_str_record", - "name": "Python 开源|树模型-写入:测试带有类型推断的写入:写入单条记录", - "description": "测试带有类型推断的写入:写入单条记录", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_aligned_str_record", - "name": "Python 开源|树模型-写入:测试带有类型推断的写入:写入单条对齐记录", - "description": "测试带有类型推断的写入:写入单条对齐记录", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_string_records_of_one_device", - "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录", - "description": "测试带有类型推断的写入:往一个设备中写入多条记录", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device", - "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录", - "description": "测试带有类型推断的写入:往一个设备中写入多条对齐记录", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_direct", - "name": "Python 开源|树模型-写入:测试直接写入", - "description": "测试直接写入", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_delete_data1", - "name": "Python 开源|树模型-写入:测试删除多个时间序列全部的数据", - "description": "测试删除多个时间序列全部的数据", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_delete_data2", - "name": "Python 开源|树模型-写入:测试删除多个时间序列指定范围的数据(删除全部数据)", - "description": "测试删除多个时间序列指定范围的数据(删除全部数据)", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_check_sorted", - "name": "Python 开源|树模型-写入:测试检查顺序函数:check_sorted", - "description": "测试检查顺序函数:check_sorted", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_string_records_of_one_device_error", - "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录", - "description": "测试带有类型推断的写入:往一个设备中写入多条记录", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device_error", - "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录", - "description": "测试带有类型推断的写入:往一个设备中写入多条对齐记录", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_records_error", - "name": "Python 开源|树模型-写入:测试insert_records数量不一致情况", - "description": "测试insert_records数量不一致情况", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_str_record_error", - "name": "Python 开源|树模型-写入:测试 insert_str_record 数量不一致情况", - "description": "测试 insert_str_record 数量不一致情况", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_insert.py::test_insert_record_error", - "name": "Python 开源|树模型-写入:测试 insert_record 数量不一致情况", - "description": "测试 insert_record 数量不一致情况", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-写入" - ] - }, - { - "target": "tree/test_treemodel_query.py::test_execute_query_statement", - "name": "Python 开源|树模型-查询:测试 execute_query_statement 函数", - "description": "测试 execute_query_statement 函数", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-查询" - ] - }, - { - "target": "tree/test_treemodel_query.py::test_execute_raw_data_query", - "name": "Python 开源|树模型-查询:测试 execute_raw_data_query 函数", - "description": "测试 execute_raw_data_query 函数", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-查询" - ] - }, - { - "target": "tree/test_treemodel_query.py::test_execute_last_data_query", - "name": "Python 开源|树模型-查询:测试 execute_last_data_query 函数", - "description": "测试 execute_last_data_query 函数", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-查询" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session1", - "name": "Python 开源|树模型-会话:最简 session 连接(host/port + 显式凭据)", - "description": "测试最简 session 连接路径:host/port 来自配置,凭据显式传入(PLM TimechoDB 默认口令非 root/root)。", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session2", - "name": "Python 开源|树模型-会话:测试session连接:最繁构造", - "description": "测试session连接:最繁构造", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session3", - "name": "Python 开源|树模型-会话:测试session连接:多次open", - "description": "测试session连接:多次open", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session4", - "name": "Python 开源|树模型-会话:测试session连接:多次close", - "description": "测试session连接:多次close", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session5", - "name": "Python 开源|树模型-会话:测试session连接:close后再open", - "description": "测试session连接:close后再open", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session6", - "name": "Python 开源|树模型-会话:测试超时连接:需要手动测试,不清楚具体多久会超时", - "description": "测试超时连接:需要手动测试,不清楚具体多久会超时", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session7", - "name": "Python 开源|树模型-会话:测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置", - "description": "测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session8", - "name": "Python 开源|树模型-会话:测试session的get_time_zone和set_time_zone函数", - "description": "测试session的get_time_zone和set_time_zone函数", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session9", - "name": "Python 开源|树模型-会话:测试session的 execute_statement 函数", - "description": "测试session的 execute_statement 函数", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session10", - "name": "Python 开源|树模型-会话:测试session的 execute_non_query_statement 和 execute_query_statement 函数", - "description": "测试session的 execute_non_query_statement 和 execute_query_statement 函数", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session_error2", - "name": "Python 开源|树模型-会话:测试session的 execute_non_query_statement函数异常情况", - "description": "测试session的 execute_non_query_statement函数异常情况", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session_error3", - "name": "Python 开源|树模型-会话:测试session的 execute_query_statement函数异常情况", - "description": "测试session的 execute_query_statement函数异常情况", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session_error4", - "name": "Python 开源|树模型-会话:测试session的 execute_statement函数异常情况", - "description": "测试session的 execute_statement函数异常情况", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session.py::test_session_error5", - "name": "Python 开源|树模型-会话:测试session的set_time_zone函数异常情况", - "description": "测试session的set_time_zone函数异常情况", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话" - ] - }, - { - "target": "tree/test_treemodel_session_pool.py::test_session_pool1", - "name": "Python 开源|树模型-会话池:测试session_pool:最简构造", - "description": "测试session_pool:最简构造", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话池" - ] - }, - { - "target": "tree/test_treemodel_session_pool.py::test_session_pool2", - "name": "Python 开源|树模型-会话池:测试session_pool:最繁构造", - "description": "测试session_pool:最繁构造", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话池" - ] - }, - { - "target": "tree/test_treemodel_session_pool.py::test_session_pool3", - "name": "Python 开源|树模型-会话池:测试SessionPool的SSL连接", - "description": "测试SessionPool的SSL连接", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话池" - ] - }, - { - "target": "tree/test_treemodel_session_pool.py::test_session_pool4", - "name": "Python 开源|树模型-会话池:测试session_pool:无node_urls", - "description": "测试session_pool:无node_urls", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话池" - ] - }, - { - "target": "tree/test_treemodel_session_pool.py::test_session_pool5", - "name": "Python 开源|树模型-会话池:测试session_pool:push_back的session未open", - "description": "测试session_pool:push_back的session未open", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话池" - ] - }, - { - "target": "tree/test_treemodel_session_pool.py::test_session_pool_error1", - "name": "Python 开源|树模型-会话池:测试session_pool:node_urls为None", - "description": "测试session_pool:node_urls为None", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话池" - ] - }, - { - "target": "tree/test_treemodel_session_pool.py::test_session_pool_error2", - "name": "Python 开源|树模型-会话池:测试session_pool:get_session前关闭session_pool", - "description": "测试session_pool:get_session前关闭session_pool", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话池" - ] - }, - { - "target": "tree/test_treemodel_session_pool.py::test_session_pool_error3", - "name": "Python 开源|树模型-会话池:测试session_pool:put_back的session_pool已经close", - "description": "测试session_pool:put_back的session_pool已经close", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话池" - ] - }, - { - "target": "tree/test_treemodel_session_pool.py::test_session_pool_error4", - "name": "Python 开源|树模型-会话池:测试session_pool:创建session_pool时,max_pool_size <= 0", - "description": "测试session_pool:创建session_pool时,max_pool_size <= 0", - "priority": "P2", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-会话池" - ] - }, - { - "target": "tree/test_treemodel_timeseries.py::test_timeseries1", - "name": "Python 开源|树模型-时间序列:测试创建非对齐时间序列:create_time_series", - "description": "测试创建非对齐时间序列:create_time_series", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-时间序列" - ] - }, - { - "target": "tree/test_treemodel_timeseries.py::test_aligned_timeseries1", - "name": "Python 开源|树模型-时间序列:测试创建对齐时间序列:create_aligned_time_series", - "description": "测试创建对齐时间序列:create_aligned_time_series", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-时间序列" - ] - }, - { - "target": "tree/test_treemodel_timeseries.py::test_multi_timeseries1", - "name": "Python 开源|树模型-时间序列:测试创建多个非对齐时间序列", - "description": "测试创建多个非对齐时间序列", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-时间序列" - ] - }, - { - "target": "tree/test_treemodel_timeseries.py::test_delete_timeseries1", - "name": "Python 开源|树模型-时间序列:测试删除时间序列:session.delete_time_series()", - "description": "测试删除时间序列:session.delete_time_series()", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-时间序列" - ] - }, - { - "target": "tree/test_treemodel_timeseries.py::test_check_timeseries_exists1", - "name": "Python 开源|树模型-时间序列:测试检查时间序列是否存在:check_time_series_exists", - "description": "测试检查时间序列是否存在:check_time_series_exists", - "priority": "P1", - "caseType": "功能测试", - "model": "树模型", - "automationType": "session-python", - "featurePaths": [ - "接口模块/Python 原生接口/树模型-时间序列" - ] - } - ] -} +{ + "productId": 1, + "defaults": { + "caseType": "功能测试", + "model": "通用", + "owner": "肖林捷", + "automationType": "session-python", + "executeMethod": "自动" + }, + "cases": [ + { + "target": "table/test_tablemodel_insert.py::test_insert1", + "name": "Python 开源|表模型-写入:测试一般写入数据", + "description": "测试一般写入数据", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-写入" + ], + "plmCaseId": "TimechoDB-3127", + "plmId": 7698 + }, + { + "target": "table/test_tablemodel_insert.py::test_insert2", + "name": "Python 开源|表模型-写入:测试Numpy_tablet写入数据", + "description": "测试Numpy_tablet写入数据", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-写入" + ], + "plmCaseId": "TimechoDB-3128", + "plmId": 7699 + }, + { + "target": "table/test_tablemodel_insert.py::test_insert3", + "name": "Python 开源|表模型-写入:测试直接写入数据", + "description": "测试直接写入数据", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-写入" + ], + "plmCaseId": "TimechoDB-3129", + "plmId": 7700 + }, + { + "target": "table/test_tablemodel_insert.py::test_insert4", + "name": "Python 开源|表模型-写入:乱序写入:测试时间戳自动排序功能", + "description": "乱序写入:测试时间戳自动排序功能", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-写入" + ], + "plmCaseId": "TimechoDB-3130", + "plmId": 7701 + }, + { + "target": "table/test_tablemodel_insert.py::test_insert_error1", + "name": "Python 开源|表模型-写入:错误情况:时间戳长度和值长度不一致", + "description": "错误情况:时间戳长度和值长度不一致", + "priority": "P2", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-写入" + ], + "plmCaseId": "TimechoDB-3131", + "plmId": 7702 + }, + { + "target": "table/test_tablemodel_query.py::test_query1", + "name": "Python 开源|表模型-查询:测试SessionDataSet:验证列类型和数据类型以及行数的正确性", + "description": "测试SessionDataSet:验证列类型和数据类型以及行数的正确性", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ], + "plmCaseId": "TimechoDB-3132", + "plmId": 7703 + }, + { + "target": "table/test_tablemodel_query.py::test_query2", + "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时", + "description": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ], + "plmCaseId": "TimechoDB-3133", + "plmId": 7704 + }, + { + "target": "table/test_tablemodel_query.py::test_query3", + "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时", + "description": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ], + "plmCaseId": "TimechoDB-3134", + "plmId": 7705 + }, + { + "target": "table/test_tablemodel_query.py::test_query4", + "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时", + "description": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ], + "plmCaseId": "TimechoDB-3135", + "plmId": 7706 + }, + { + "target": "table/test_tablemodel_query.py::test_query5", + "name": "Python 开源|表模型-查询:测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000", + "description": "测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000", + "priority": "P2", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ], + "plmCaseId": "TimechoDB-3136", + "plmId": 7707 + }, + { + "target": "table/test_tablemodel_query.py::test_fields1", + "name": "Python 开源|表模型-查询:测试fields查询:验证类型", + "description": "测试fields查询:验证类型", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ], + "plmCaseId": "TimechoDB-3137", + "plmId": 7708 + }, + { + "target": "table/test_tablemodel_query.py::test_fields2", + "name": "Python 开源|表模型-查询:测试fields查询:验证字段值", + "description": "测试fields查询:验证字段值", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ], + "plmCaseId": "TimechoDB-3138", + "plmId": 7709 + }, + { + "target": "table/test_tablemodel_query.py::test_fields3", + "name": "Python 开源|表模型-查询:测试fields查询:测试is_null、copy和set_xxx_value等方法有效性", + "description": "测试fields查询:测试is_null、copy和set_xxx_value等方法有效性", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ], + "plmCaseId": "TimechoDB-3139", + "plmId": 7710 + }, + { + "target": "table/test_tablemodel_query.py::test_fields_error1", + "name": "Python 开源|表模型-查询:测试fields查询, get_XXX_valu e异常情况", + "description": "测试fields查询, get_XXX_valu e异常情况", + "priority": "P2", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ], + "plmCaseId": "TimechoDB-3140", + "plmId": 7711 + }, + { + "target": "table/test_tablemodel_query.py::test_query_error1", + "name": "Python 开源|表模型-查询:测试 StatementExecutionException 异常", + "description": "测试 StatementExecutionException 异常", + "priority": "P2", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-查询" + ], + "plmCaseId": "TimechoDB-3141", + "plmId": 7712 + }, + { + "target": "table/test_tablemodel_session.py::test_session1", + "name": "Python 开源|表模型-会话:测试最简 session 连接:默认url地址为localhost:6667", + "description": "测试最简 session 连接:默认url地址为localhost:6667", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ], + "plmCaseId": "TimechoDB-3142", + "plmId": 7713 + }, + { + "target": "table/test_tablemodel_session.py::test_session2", + "name": "Python 开源|表模型-会话:测试最全 session 连接:session指定数据库", + "description": "测试最全 session 连接:session指定数据库", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ], + "plmCaseId": "TimechoDB-3143", + "plmId": 7714 + }, + { + "target": "table/test_tablemodel_session.py::test_session3", + "name": "Python 开源|表模型-会话:测试 enable_redirection 参数:关闭重定向", + "description": "测试 enable_redirection 参数:关闭重定向", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ], + "plmCaseId": "TimechoDB-3144", + "plmId": 7715 + }, + { + "target": "table/test_tablemodel_session.py::test_session4", + "name": "Python 开源|表模型-会话:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "description": "测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ], + "plmCaseId": "TimechoDB-3145", + "plmId": 7716 + }, + { + "target": "table/test_tablemodel_session.py::test_session5", + "name": "Python 开源|表模型-会话:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "description": "测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ], + "plmCaseId": "TimechoDB-3146", + "plmId": 7717 + }, + { + "target": "table/test_tablemodel_session.py::test_session6", + "name": "Python 开源|表模型-会话:测试 connection_timeout_in_ms 参数", + "description": "测试 connection_timeout_in_ms 参数", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ], + "plmCaseId": "TimechoDB-3147", + "plmId": 7718 + }, + { + "target": "table/test_tablemodel_session.py::test_session7", + "name": "Python 开源|表模型-会话:测试多次 Close", + "description": "测试多次 Close", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ], + "plmCaseId": "TimechoDB-3148", + "plmId": 7719 + }, + { + "target": "table/test_tablemodel_session.py::test_session_error1", + "name": "Python 开源|表模型-会话:IoTDBConnectionException异常:未实现", + "description": "IoTDBConnectionException异常:未实现", + "priority": "P2", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话" + ], + "plmCaseId": "TimechoDB-3149", + "plmId": 7720 + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session1", + "name": "Python 开源|表模型-会话池:最简 session_pool 连接(node_urls + 显式凭据)", + "description": "测试最简 session_pool 连接路径:node_urls 来自配置,凭据显式传入(PLM TimechoDB 默认口令非 root/root)。", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ], + "plmCaseId": "TimechoDB-3150", + "plmId": 7721 + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session2", + "name": "Python 开源|表模型-会话池:测试最全 session 连接:session指定数据库", + "description": "测试最全 session 连接:session指定数据库", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ], + "plmCaseId": "TimechoDB-3151", + "plmId": 7722 + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session3", + "name": "Python 开源|表模型-会话池:测试 enable_redirection 参数:关闭重定向", + "description": "测试 enable_redirection 参数:关闭重定向", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ], + "plmCaseId": "TimechoDB-3152", + "plmId": 7723 + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session4", + "name": "Python 开源|表模型-会话池:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "description": "测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ], + "plmCaseId": "TimechoDB-3153", + "plmId": 7724 + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session5", + "name": "Python 开源|表模型-会话池:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "description": "测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ], + "plmCaseId": "TimechoDB-3154", + "plmId": 7725 + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session6", + "name": "Python 开源|表模型-会话池:测试 connection_timeout_in_ms 参数", + "description": "测试 connection_timeout_in_ms 参数", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ], + "plmCaseId": "TimechoDB-3155", + "plmId": 7726 + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session8", + "name": "Python 开源|表模型-会话池:测试 max_retry 参数:0, 1, 100, 10000", + "description": "测试 max_retry 参数:0, 1, 100, 10000", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ], + "plmCaseId": "TimechoDB-3156", + "plmId": 7727 + }, + { + "target": "table/test_tablemodel_session_pool.py::test_session9", + "name": "Python 开源|表模型-会话池:测试 max_pool_size 参数:0, 1, 100, 10000", + "description": "测试 max_pool_size 参数:0, 1, 100, 10000", + "priority": "P1", + "caseType": "功能测试", + "model": "表模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/表模型-会话池" + ], + "plmCaseId": "TimechoDB-3157", + "plmId": 7728 + }, + { + "target": "tree/test_treemodel_database.py::test_database1", + "name": "Python 开源|树模型-数据库:测试创建数据库:set_storage_group", + "description": "测试创建数据库:set_storage_group", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-数据库" + ], + "plmCaseId": "TimechoDB-3158", + "plmId": 7729 + }, + { + "target": "tree/test_treemodel_database.py::test_database2", + "name": "Python 开源|树模型-数据库:测试删除数据库:delete_storage_group 和 delete_storage_groups", + "description": "测试删除数据库:delete_storage_group 和 delete_storage_groups", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-数据库" + ], + "plmCaseId": "TimechoDB-3159", + "plmId": 7730 + }, + { + "target": "tree/test_treemodel_database.py::test_database_error1", + "name": "Python 开源|树模型-数据库:测试delete_storage_group异常:未创建连接而执行或执行时session重连", + "description": "测试delete_storage_group异常:未创建连接而执行或执行时session重连", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-数据库" + ], + "plmCaseId": "TimechoDB-3160", + "plmId": 7731 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_tablet", + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入一条 tablet 数据", + "description": "测试往非对齐时间序列写入一条 tablet 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3161", + "plmId": 7732 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_tablet", + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入一条 tablet 数据", + "description": "测试往对齐时间序列写入一条 tablet 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3162", + "plmId": 7733 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_tablets", + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入多条 tablet 数据", + "description": "测试往非对齐时间序列写入多条 tablet 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3163", + "plmId": 7734 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_tablets", + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入多条 tablet 数据", + "description": "测试往对齐时间序列写入多条 tablet 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3164", + "plmId": 7735 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_record", + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入一条 Record 数据", + "description": "测试往非对齐时间序列写入一条 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3165", + "plmId": 7736 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_record", + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入一条 Record 数据", + "description": "测试往对齐时间序列写入一条 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3166", + "plmId": 7737 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_records", + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入多条 Record 数据", + "description": "测试往非对齐时间序列写入多条 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3167", + "plmId": 7738 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_records", + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入多条 Record 数据", + "description": "测试往对齐时间序列写入多条 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3168", + "plmId": 7739 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_records_of_one_device", + "name": "Python 开源|树模型-写入:测试插入同属于一个非对齐 device 的多个 Record 数据", + "description": "测试插入同属于一个非对齐 device 的多个 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3169", + "plmId": 7740 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_records_of_one_device", + "name": "Python 开源|树模型-写入:测试插入同属于一个对齐 device 的多个 Record 数据", + "description": "测试插入同属于一个对齐 device 的多个 Record 数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3170", + "plmId": 7741 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_str_record", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:写入单条记录", + "description": "测试带有类型推断的写入:写入单条记录", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3171", + "plmId": 7742 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_str_record", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:写入单条对齐记录", + "description": "测试带有类型推断的写入:写入单条对齐记录", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3172", + "plmId": 7743 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_string_records_of_one_device", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录", + "description": "测试带有类型推断的写入:往一个设备中写入多条记录", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3173", + "plmId": 7744 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "description": "测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3174", + "plmId": 7745 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_direct", + "name": "Python 开源|树模型-写入:测试直接写入", + "description": "测试直接写入", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3175", + "plmId": 7746 + }, + { + "target": "tree/test_treemodel_insert.py::test_delete_data1", + "name": "Python 开源|树模型-写入:测试删除多个时间序列全部的数据", + "description": "测试删除多个时间序列全部的数据", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3176", + "plmId": 7747 + }, + { + "target": "tree/test_treemodel_insert.py::test_delete_data2", + "name": "Python 开源|树模型-写入:测试删除多个时间序列指定范围的数据(删除全部数据)", + "description": "测试删除多个时间序列指定范围的数据(删除全部数据)", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3177", + "plmId": 7748 + }, + { + "target": "tree/test_treemodel_insert.py::test_check_sorted", + "name": "Python 开源|树模型-写入:测试检查顺序函数:check_sorted", + "description": "测试检查顺序函数:check_sorted", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3178", + "plmId": 7749 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_string_records_of_one_device_error", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录", + "description": "测试带有类型推断的写入:往一个设备中写入多条记录", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3179", + "plmId": 7750 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device_error", + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "description": "测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3180", + "plmId": 7751 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_records_error", + "name": "Python 开源|树模型-写入:测试insert_records数量不一致情况", + "description": "测试insert_records数量不一致情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3181", + "plmId": 7752 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_str_record_error", + "name": "Python 开源|树模型-写入:测试 insert_str_record 数量不一致情况", + "description": "测试 insert_str_record 数量不一致情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3182", + "plmId": 7753 + }, + { + "target": "tree/test_treemodel_insert.py::test_insert_record_error", + "name": "Python 开源|树模型-写入:测试 insert_record 数量不一致情况", + "description": "测试 insert_record 数量不一致情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-写入" + ], + "plmCaseId": "TimechoDB-3183", + "plmId": 7754 + }, + { + "target": "tree/test_treemodel_query.py::test_execute_query_statement", + "name": "Python 开源|树模型-查询:测试 execute_query_statement 函数", + "description": "测试 execute_query_statement 函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-查询" + ], + "plmCaseId": "TimechoDB-3184", + "plmId": 7755 + }, + { + "target": "tree/test_treemodel_query.py::test_execute_raw_data_query", + "name": "Python 开源|树模型-查询:测试 execute_raw_data_query 函数", + "description": "测试 execute_raw_data_query 函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-查询" + ], + "plmCaseId": "TimechoDB-3185", + "plmId": 7756 + }, + { + "target": "tree/test_treemodel_query.py::test_execute_last_data_query", + "name": "Python 开源|树模型-查询:测试 execute_last_data_query 函数", + "description": "测试 execute_last_data_query 函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-查询" + ], + "plmCaseId": "TimechoDB-3186", + "plmId": 7757 + }, + { + "target": "tree/test_treemodel_session.py::test_session1", + "name": "Python 开源|树模型-会话:最简 session 连接(host/port + 显式凭据)", + "description": "测试最简 session 连接路径:host/port 来自配置,凭据显式传入(PLM TimechoDB 默认口令非 root/root)。", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3187", + "plmId": 7758 + }, + { + "target": "tree/test_treemodel_session.py::test_session2", + "name": "Python 开源|树模型-会话:测试session连接:最繁构造", + "description": "测试session连接:最繁构造", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3188", + "plmId": 7759 + }, + { + "target": "tree/test_treemodel_session.py::test_session3", + "name": "Python 开源|树模型-会话:测试session连接:多次open", + "description": "测试session连接:多次open", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3189", + "plmId": 7760 + }, + { + "target": "tree/test_treemodel_session.py::test_session4", + "name": "Python 开源|树模型-会话:测试session连接:多次close", + "description": "测试session连接:多次close", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3190", + "plmId": 7761 + }, + { + "target": "tree/test_treemodel_session.py::test_session5", + "name": "Python 开源|树模型-会话:测试session连接:close后再open", + "description": "测试session连接:close后再open", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3191", + "plmId": 7762 + }, + { + "target": "tree/test_treemodel_session.py::test_session6", + "name": "Python 开源|树模型-会话:测试超时连接:需要手动测试,不清楚具体多久会超时", + "description": "测试超时连接:需要手动测试,不清楚具体多久会超时", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3192", + "plmId": 7763 + }, + { + "target": "tree/test_treemodel_session.py::test_session7", + "name": "Python 开源|树模型-会话:测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置", + "description": "测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3193", + "plmId": 7764 + }, + { + "target": "tree/test_treemodel_session.py::test_session8", + "name": "Python 开源|树模型-会话:测试session的get_time_zone和set_time_zone函数", + "description": "测试session的get_time_zone和set_time_zone函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3194", + "plmId": 7765 + }, + { + "target": "tree/test_treemodel_session.py::test_session9", + "name": "Python 开源|树模型-会话:测试session的 execute_statement 函数", + "description": "测试session的 execute_statement 函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3195", + "plmId": 7766 + }, + { + "target": "tree/test_treemodel_session.py::test_session10", + "name": "Python 开源|树模型-会话:测试session的 execute_non_query_statement 和 execute_query_statement 函数", + "description": "测试session的 execute_non_query_statement 和 execute_query_statement 函数", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3196", + "plmId": 7767 + }, + { + "target": "tree/test_treemodel_session.py::test_session_error2", + "name": "Python 开源|树模型-会话:测试session的 execute_non_query_statement函数异常情况", + "description": "测试session的 execute_non_query_statement函数异常情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3197", + "plmId": 7768 + }, + { + "target": "tree/test_treemodel_session.py::test_session_error3", + "name": "Python 开源|树模型-会话:测试session的 execute_query_statement函数异常情况", + "description": "测试session的 execute_query_statement函数异常情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3198", + "plmId": 7769 + }, + { + "target": "tree/test_treemodel_session.py::test_session_error4", + "name": "Python 开源|树模型-会话:测试session的 execute_statement函数异常情况", + "description": "测试session的 execute_statement函数异常情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3199", + "plmId": 7770 + }, + { + "target": "tree/test_treemodel_session.py::test_session_error5", + "name": "Python 开源|树模型-会话:测试session的set_time_zone函数异常情况", + "description": "测试session的set_time_zone函数异常情况", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话" + ], + "plmCaseId": "TimechoDB-3200", + "plmId": 7771 + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool1", + "name": "Python 开源|树模型-会话池:测试session_pool:最简构造", + "description": "测试session_pool:最简构造", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ], + "plmCaseId": "TimechoDB-3201", + "plmId": 7772 + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool2", + "name": "Python 开源|树模型-会话池:测试session_pool:最繁构造", + "description": "测试session_pool:最繁构造", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ], + "plmCaseId": "TimechoDB-3202", + "plmId": 7773 + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool3", + "name": "Python 开源|树模型-会话池:测试SessionPool的SSL连接", + "description": "测试SessionPool的SSL连接", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ], + "plmCaseId": "TimechoDB-3203", + "plmId": 7774 + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool4", + "name": "Python 开源|树模型-会话池:测试session_pool:无node_urls", + "description": "测试session_pool:无node_urls", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ], + "plmCaseId": "TimechoDB-3204", + "plmId": 7775 + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool5", + "name": "Python 开源|树模型-会话池:测试session_pool:push_back的session未open", + "description": "测试session_pool:push_back的session未open", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ], + "plmCaseId": "TimechoDB-3205", + "plmId": 7776 + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool_error1", + "name": "Python 开源|树模型-会话池:测试session_pool:node_urls为None", + "description": "测试session_pool:node_urls为None", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ], + "plmCaseId": "TimechoDB-3206", + "plmId": 7777 + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool_error2", + "name": "Python 开源|树模型-会话池:测试session_pool:get_session前关闭session_pool", + "description": "测试session_pool:get_session前关闭session_pool", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ], + "plmCaseId": "TimechoDB-3207", + "plmId": 7778 + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool_error3", + "name": "Python 开源|树模型-会话池:测试session_pool:put_back的session_pool已经close", + "description": "测试session_pool:put_back的session_pool已经close", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ], + "plmCaseId": "TimechoDB-3208", + "plmId": 7779 + }, + { + "target": "tree/test_treemodel_session_pool.py::test_session_pool_error4", + "name": "Python 开源|树模型-会话池:测试session_pool:创建session_pool时,max_pool_size <= 0", + "description": "测试session_pool:创建session_pool时,max_pool_size <= 0", + "priority": "P2", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-会话池" + ], + "plmCaseId": "TimechoDB-3209", + "plmId": 7780 + }, + { + "target": "tree/test_treemodel_timeseries.py::test_timeseries1", + "name": "Python 开源|树模型-时间序列:测试创建非对齐时间序列:create_time_series", + "description": "测试创建非对齐时间序列:create_time_series", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-时间序列" + ], + "plmCaseId": "TimechoDB-3210", + "plmId": 7781 + }, + { + "target": "tree/test_treemodel_timeseries.py::test_aligned_timeseries1", + "name": "Python 开源|树模型-时间序列:测试创建对齐时间序列:create_aligned_time_series", + "description": "测试创建对齐时间序列:create_aligned_time_series", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-时间序列" + ], + "plmCaseId": "TimechoDB-3211", + "plmId": 7782 + }, + { + "target": "tree/test_treemodel_timeseries.py::test_multi_timeseries1", + "name": "Python 开源|树模型-时间序列:测试创建多个非对齐时间序列", + "description": "测试创建多个非对齐时间序列", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-时间序列" + ], + "plmCaseId": "TimechoDB-3212", + "plmId": 7783 + }, + { + "target": "tree/test_treemodel_timeseries.py::test_delete_timeseries1", + "name": "Python 开源|树模型-时间序列:测试删除时间序列:session.delete_time_series()", + "description": "测试删除时间序列:session.delete_time_series()", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-时间序列" + ], + "plmCaseId": "TimechoDB-3213", + "plmId": 7784 + }, + { + "target": "tree/test_treemodel_timeseries.py::test_check_timeseries_exists1", + "name": "Python 开源|树模型-时间序列:测试检查时间序列是否存在:check_time_series_exists", + "description": "测试检查时间序列是否存在:check_time_series_exists", + "priority": "P1", + "caseType": "功能测试", + "model": "树模型", + "automationType": "session-python", + "featurePaths": [ + "接口模块/Python 原生接口/树模型-时间序列" + ], + "plmCaseId": "TimechoDB-3214", + "plmId": 7785 + } + ] +} diff --git a/.plm-case-id-map.json b/.plm-case-id-map.json new file mode 100644 index 0000000..20cc17f --- /dev/null +++ b/.plm-case-id-map.json @@ -0,0 +1,359 @@ +{ + "nmap": { + "TimechoDB-3127": [ + "table/test_tablemodel_insert.py::test_insert1" + ], + "TimechoDB-3128": [ + "table/test_tablemodel_insert.py::test_insert2" + ], + "TimechoDB-3129": [ + "table/test_tablemodel_insert.py::test_insert3" + ], + "TimechoDB-3130": [ + "table/test_tablemodel_insert.py::test_insert4" + ], + "TimechoDB-3131": [ + "table/test_tablemodel_insert.py::test_insert_error1" + ], + "TimechoDB-3132": [ + "table/test_tablemodel_query.py::test_query1" + ], + "TimechoDB-3133": [ + "table/test_tablemodel_query.py::test_query2" + ], + "TimechoDB-3134": [ + "table/test_tablemodel_query.py::test_query3" + ], + "TimechoDB-3135": [ + "table/test_tablemodel_query.py::test_query4" + ], + "TimechoDB-3136": [ + "table/test_tablemodel_query.py::test_query5" + ], + "TimechoDB-3137": [ + "table/test_tablemodel_query.py::test_fields1" + ], + "TimechoDB-3138": [ + "table/test_tablemodel_query.py::test_fields2" + ], + "TimechoDB-3139": [ + "table/test_tablemodel_query.py::test_fields3" + ], + "TimechoDB-3140": [ + "table/test_tablemodel_query.py::test_fields_error1" + ], + "TimechoDB-3141": [ + "table/test_tablemodel_query.py::test_query_error1" + ], + "TimechoDB-3142": [ + "table/test_tablemodel_session.py::test_session1" + ], + "TimechoDB-3143": [ + "table/test_tablemodel_session.py::test_session2" + ], + "TimechoDB-3144": [ + "table/test_tablemodel_session.py::test_session3" + ], + "TimechoDB-3145": [ + "table/test_tablemodel_session.py::test_session4" + ], + "TimechoDB-3146": [ + "table/test_tablemodel_session.py::test_session5" + ], + "TimechoDB-3147": [ + "table/test_tablemodel_session.py::test_session6" + ], + "TimechoDB-3148": [ + "table/test_tablemodel_session.py::test_session7" + ], + "TimechoDB-3149": [ + "table/test_tablemodel_session.py::test_session_error1" + ], + "TimechoDB-3150": [ + "table/test_tablemodel_session_pool.py::test_session1" + ], + "TimechoDB-3151": [ + "table/test_tablemodel_session_pool.py::test_session2" + ], + "TimechoDB-3152": [ + "table/test_tablemodel_session_pool.py::test_session3" + ], + "TimechoDB-3153": [ + "table/test_tablemodel_session_pool.py::test_session4" + ], + "TimechoDB-3154": [ + "table/test_tablemodel_session_pool.py::test_session5" + ], + "TimechoDB-3155": [ + "table/test_tablemodel_session_pool.py::test_session6" + ], + "TimechoDB-3156": [ + "table/test_tablemodel_session_pool.py::test_session8" + ], + "TimechoDB-3157": [ + "table/test_tablemodel_session_pool.py::test_session9" + ], + "TimechoDB-3158": [ + "tree/test_treemodel_database.py::test_database1" + ], + "TimechoDB-3159": [ + "tree/test_treemodel_database.py::test_database2" + ], + "TimechoDB-3160": [ + "tree/test_treemodel_database.py::test_database_error1" + ], + "TimechoDB-3161": [ + "tree/test_treemodel_insert.py::test_insert_tablet" + ], + "TimechoDB-3162": [ + "tree/test_treemodel_insert.py::test_insert_aligned_tablet" + ], + "TimechoDB-3163": [ + "tree/test_treemodel_insert.py::test_insert_tablets" + ], + "TimechoDB-3164": [ + "tree/test_treemodel_insert.py::test_insert_aligned_tablets" + ], + "TimechoDB-3165": [ + "tree/test_treemodel_insert.py::test_insert_record" + ], + "TimechoDB-3166": [ + "tree/test_treemodel_insert.py::test_insert_aligned_record" + ], + "TimechoDB-3167": [ + "tree/test_treemodel_insert.py::test_insert_records" + ], + "TimechoDB-3168": [ + "tree/test_treemodel_insert.py::test_insert_aligned_records" + ], + "TimechoDB-3169": [ + "tree/test_treemodel_insert.py::test_insert_records_of_one_device" + ], + "TimechoDB-3170": [ + "tree/test_treemodel_insert.py::test_insert_aligned_records_of_one_device" + ], + "TimechoDB-3171": [ + "tree/test_treemodel_insert.py::test_insert_str_record" + ], + "TimechoDB-3172": [ + "tree/test_treemodel_insert.py::test_insert_aligned_str_record" + ], + "TimechoDB-3173": [ + "tree/test_treemodel_insert.py::test_insert_string_records_of_one_device" + ], + "TimechoDB-3174": [ + "tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device" + ], + "TimechoDB-3175": [ + "tree/test_treemodel_insert.py::test_insert_direct" + ], + "TimechoDB-3176": [ + "tree/test_treemodel_insert.py::test_delete_data1" + ], + "TimechoDB-3177": [ + "tree/test_treemodel_insert.py::test_delete_data2" + ], + "TimechoDB-3178": [ + "tree/test_treemodel_insert.py::test_check_sorted" + ], + "TimechoDB-3179": [ + "tree/test_treemodel_insert.py::test_insert_string_records_of_one_device_error" + ], + "TimechoDB-3180": [ + "tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device_error" + ], + "TimechoDB-3181": [ + "tree/test_treemodel_insert.py::test_insert_records_error" + ], + "TimechoDB-3182": [ + "tree/test_treemodel_insert.py::test_insert_str_record_error" + ], + "TimechoDB-3183": [ + "tree/test_treemodel_insert.py::test_insert_record_error" + ], + "TimechoDB-3184": [ + "tree/test_treemodel_query.py::test_execute_query_statement" + ], + "TimechoDB-3185": [ + "tree/test_treemodel_query.py::test_execute_raw_data_query" + ], + "TimechoDB-3186": [ + "tree/test_treemodel_query.py::test_execute_last_data_query" + ], + "TimechoDB-3187": [ + "tree/test_treemodel_session.py::test_session1" + ], + "TimechoDB-3188": [ + "tree/test_treemodel_session.py::test_session2" + ], + "TimechoDB-3189": [ + "tree/test_treemodel_session.py::test_session3" + ], + "TimechoDB-3190": [ + "tree/test_treemodel_session.py::test_session4" + ], + "TimechoDB-3191": [ + "tree/test_treemodel_session.py::test_session5" + ], + "TimechoDB-3192": [ + "tree/test_treemodel_session.py::test_session6" + ], + "TimechoDB-3193": [ + "tree/test_treemodel_session.py::test_session7" + ], + "TimechoDB-3194": [ + "tree/test_treemodel_session.py::test_session8" + ], + "TimechoDB-3195": [ + "tree/test_treemodel_session.py::test_session9" + ], + "TimechoDB-3196": [ + "tree/test_treemodel_session.py::test_session10" + ], + "TimechoDB-3197": [ + "tree/test_treemodel_session.py::test_session_error2" + ], + "TimechoDB-3198": [ + "tree/test_treemodel_session.py::test_session_error3" + ], + "TimechoDB-3199": [ + "tree/test_treemodel_session.py::test_session_error4" + ], + "TimechoDB-3200": [ + "tree/test_treemodel_session.py::test_session_error5" + ], + "TimechoDB-3201": [ + "tree/test_treemodel_session_pool.py::test_session_pool1" + ], + "TimechoDB-3202": [ + "tree/test_treemodel_session_pool.py::test_session_pool2" + ], + "TimechoDB-3203": [ + "tree/test_treemodel_session_pool.py::test_session_pool3" + ], + "TimechoDB-3204": [ + "tree/test_treemodel_session_pool.py::test_session_pool4" + ], + "TimechoDB-3205": [ + "tree/test_treemodel_session_pool.py::test_session_pool5" + ], + "TimechoDB-3206": [ + "tree/test_treemodel_session_pool.py::test_session_pool_error1" + ], + "TimechoDB-3207": [ + "tree/test_treemodel_session_pool.py::test_session_pool_error2" + ], + "TimechoDB-3208": [ + "tree/test_treemodel_session_pool.py::test_session_pool_error3" + ], + "TimechoDB-3209": [ + "tree/test_treemodel_session_pool.py::test_session_pool_error4" + ], + "TimechoDB-3210": [ + "tree/test_treemodel_timeseries.py::test_timeseries1" + ], + "TimechoDB-3211": [ + "tree/test_treemodel_timeseries.py::test_aligned_timeseries1" + ], + "TimechoDB-3212": [ + "tree/test_treemodel_timeseries.py::test_multi_timeseries1" + ], + "TimechoDB-3213": [ + "tree/test_treemodel_timeseries.py::test_delete_timeseries1" + ], + "TimechoDB-3214": [ + "tree/test_treemodel_timeseries.py::test_check_timeseries_exists1" + ] + }, + "revmap": { + "table.test_tablemodel_insert::test_insert1": "TimechoDB-3127", + "table.test_tablemodel_insert::test_insert2": "TimechoDB-3128", + "table.test_tablemodel_insert::test_insert3": "TimechoDB-3129", + "table.test_tablemodel_insert::test_insert4": "TimechoDB-3130", + "table.test_tablemodel_insert::test_insert_error1": "TimechoDB-3131", + "table.test_tablemodel_query::test_query1": "TimechoDB-3132", + "table.test_tablemodel_query::test_query2": "TimechoDB-3133", + "table.test_tablemodel_query::test_query3": "TimechoDB-3134", + "table.test_tablemodel_query::test_query4": "TimechoDB-3135", + "table.test_tablemodel_query::test_query5": "TimechoDB-3136", + "table.test_tablemodel_query::test_fields1": "TimechoDB-3137", + "table.test_tablemodel_query::test_fields2": "TimechoDB-3138", + "table.test_tablemodel_query::test_fields3": "TimechoDB-3139", + "table.test_tablemodel_query::test_fields_error1": "TimechoDB-3140", + "table.test_tablemodel_query::test_query_error1": "TimechoDB-3141", + "table.test_tablemodel_session::test_session1": "TimechoDB-3142", + "table.test_tablemodel_session::test_session2": "TimechoDB-3143", + "table.test_tablemodel_session::test_session3": "TimechoDB-3144", + "table.test_tablemodel_session::test_session4": "TimechoDB-3145", + "table.test_tablemodel_session::test_session5": "TimechoDB-3146", + "table.test_tablemodel_session::test_session6": "TimechoDB-3147", + "table.test_tablemodel_session::test_session7": "TimechoDB-3148", + "table.test_tablemodel_session::test_session_error1": "TimechoDB-3149", + "table.test_tablemodel_session_pool::test_session1": "TimechoDB-3150", + "table.test_tablemodel_session_pool::test_session2": "TimechoDB-3151", + "table.test_tablemodel_session_pool::test_session3": "TimechoDB-3152", + "table.test_tablemodel_session_pool::test_session4": "TimechoDB-3153", + "table.test_tablemodel_session_pool::test_session5": "TimechoDB-3154", + "table.test_tablemodel_session_pool::test_session6": "TimechoDB-3155", + "table.test_tablemodel_session_pool::test_session8": "TimechoDB-3156", + "table.test_tablemodel_session_pool::test_session9": "TimechoDB-3157", + "tree.test_treemodel_database::test_database1": "TimechoDB-3158", + "tree.test_treemodel_database::test_database2": "TimechoDB-3159", + "tree.test_treemodel_database::test_database_error1": "TimechoDB-3160", + "tree.test_treemodel_insert::test_insert_tablet": "TimechoDB-3161", + "tree.test_treemodel_insert::test_insert_aligned_tablet": "TimechoDB-3162", + "tree.test_treemodel_insert::test_insert_tablets": "TimechoDB-3163", + "tree.test_treemodel_insert::test_insert_aligned_tablets": "TimechoDB-3164", + "tree.test_treemodel_insert::test_insert_record": "TimechoDB-3165", + "tree.test_treemodel_insert::test_insert_aligned_record": "TimechoDB-3166", + "tree.test_treemodel_insert::test_insert_records": "TimechoDB-3167", + "tree.test_treemodel_insert::test_insert_aligned_records": "TimechoDB-3168", + "tree.test_treemodel_insert::test_insert_records_of_one_device": "TimechoDB-3169", + "tree.test_treemodel_insert::test_insert_aligned_records_of_one_device": "TimechoDB-3170", + "tree.test_treemodel_insert::test_insert_str_record": "TimechoDB-3171", + "tree.test_treemodel_insert::test_insert_aligned_str_record": "TimechoDB-3172", + "tree.test_treemodel_insert::test_insert_string_records_of_one_device": "TimechoDB-3173", + "tree.test_treemodel_insert::test_insert_aligned_string_records_of_one_device": "TimechoDB-3174", + "tree.test_treemodel_insert::test_insert_direct": "TimechoDB-3175", + "tree.test_treemodel_insert::test_delete_data1": "TimechoDB-3176", + "tree.test_treemodel_insert::test_delete_data2": "TimechoDB-3177", + "tree.test_treemodel_insert::test_check_sorted": "TimechoDB-3178", + "tree.test_treemodel_insert::test_insert_string_records_of_one_device_error": "TimechoDB-3179", + "tree.test_treemodel_insert::test_insert_aligned_string_records_of_one_device_error": "TimechoDB-3180", + "tree.test_treemodel_insert::test_insert_records_error": "TimechoDB-3181", + "tree.test_treemodel_insert::test_insert_str_record_error": "TimechoDB-3182", + "tree.test_treemodel_insert::test_insert_record_error": "TimechoDB-3183", + "tree.test_treemodel_query::test_execute_query_statement": "TimechoDB-3184", + "tree.test_treemodel_query::test_execute_raw_data_query": "TimechoDB-3185", + "tree.test_treemodel_query::test_execute_last_data_query": "TimechoDB-3186", + "tree.test_treemodel_session::test_session1": "TimechoDB-3187", + "tree.test_treemodel_session::test_session2": "TimechoDB-3188", + "tree.test_treemodel_session::test_session3": "TimechoDB-3189", + "tree.test_treemodel_session::test_session4": "TimechoDB-3190", + "tree.test_treemodel_session::test_session5": "TimechoDB-3191", + "tree.test_treemodel_session::test_session6": "TimechoDB-3192", + "tree.test_treemodel_session::test_session7": "TimechoDB-3193", + "tree.test_treemodel_session::test_session8": "TimechoDB-3194", + "tree.test_treemodel_session::test_session9": "TimechoDB-3195", + "tree.test_treemodel_session::test_session10": "TimechoDB-3196", + "tree.test_treemodel_session::test_session_error2": "TimechoDB-3197", + "tree.test_treemodel_session::test_session_error3": "TimechoDB-3198", + "tree.test_treemodel_session::test_session_error4": "TimechoDB-3199", + "tree.test_treemodel_session::test_session_error5": "TimechoDB-3200", + "tree.test_treemodel_session_pool::test_session_pool1": "TimechoDB-3201", + "tree.test_treemodel_session_pool::test_session_pool2": "TimechoDB-3202", + "tree.test_treemodel_session_pool::test_session_pool3": "TimechoDB-3203", + "tree.test_treemodel_session_pool::test_session_pool4": "TimechoDB-3204", + "tree.test_treemodel_session_pool::test_session_pool5": "TimechoDB-3205", + "tree.test_treemodel_session_pool::test_session_pool_error1": "TimechoDB-3206", + "tree.test_treemodel_session_pool::test_session_pool_error2": "TimechoDB-3207", + "tree.test_treemodel_session_pool::test_session_pool_error3": "TimechoDB-3208", + "tree.test_treemodel_session_pool::test_session_pool_error4": "TimechoDB-3209", + "tree.test_treemodel_timeseries::test_timeseries1": "TimechoDB-3210", + "tree.test_treemodel_timeseries::test_aligned_timeseries1": "TimechoDB-3211", + "tree.test_treemodel_timeseries::test_multi_timeseries1": "TimechoDB-3212", + "tree.test_treemodel_timeseries::test_delete_timeseries1": "TimechoDB-3213", + "tree.test_treemodel_timeseries::test_check_timeseries_exists1": "TimechoDB-3214" + }, + "aliases": {} +} diff --git a/.plm-case-info.json b/.plm-case-info.json new file mode 100644 index 0000000..dd15386 --- /dev/null +++ b/.plm-case-info.json @@ -0,0 +1,530 @@ +{ + "TimechoDB-3127": { + "name": "Python 开源|表模型-写入:测试一般写入数据", + "nodeId": "table/test_tablemodel_insert.py::test_insert1", + "plmDescription": "测试一般写入数据", + "automationType": "session-python" + }, + "TimechoDB-3128": { + "name": "Python 开源|表模型-写入:测试Numpy_tablet写入数据", + "nodeId": "table/test_tablemodel_insert.py::test_insert2", + "plmDescription": "测试Numpy_tablet写入数据", + "automationType": "session-python" + }, + "TimechoDB-3129": { + "name": "Python 开源|表模型-写入:测试直接写入数据", + "nodeId": "table/test_tablemodel_insert.py::test_insert3", + "plmDescription": "测试直接写入数据", + "automationType": "session-python" + }, + "TimechoDB-3130": { + "name": "Python 开源|表模型-写入:乱序写入:测试时间戳自动排序功能", + "nodeId": "table/test_tablemodel_insert.py::test_insert4", + "plmDescription": "乱序写入:测试时间戳自动排序功能", + "automationType": "session-python" + }, + "TimechoDB-3131": { + "name": "Python 开源|表模型-写入:错误情况:时间戳长度和值长度不一致", + "nodeId": "table/test_tablemodel_insert.py::test_insert_error1", + "plmDescription": "错误情况:时间戳长度和值长度不一致", + "automationType": "session-python" + }, + "TimechoDB-3132": { + "name": "Python 开源|表模型-查询:测试SessionDataSet:验证列类型和数据类型以及行数的正确性", + "nodeId": "table/test_tablemodel_query.py::test_query1", + "plmDescription": "测试SessionDataSet:验证列类型和数据类型以及行数的正确性", + "automationType": "session-python" + }, + "TimechoDB-3133": { + "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时", + "nodeId": "table/test_tablemodel_query.py::test_query2", + "plmDescription": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时", + "automationType": "session-python" + }, + "TimechoDB-3134": { + "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时", + "nodeId": "table/test_tablemodel_query.py::test_query3", + "plmDescription": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时", + "automationType": "session-python" + }, + "TimechoDB-3135": { + "name": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时", + "nodeId": "table/test_tablemodel_query.py::test_query4", + "plmDescription": "测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时", + "automationType": "session-python" + }, + "TimechoDB-3136": { + "name": "Python 开源|表模型-查询:测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000", + "nodeId": "table/test_tablemodel_query.py::test_query5", + "plmDescription": "测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000", + "automationType": "session-python" + }, + "TimechoDB-3137": { + "name": "Python 开源|表模型-查询:测试fields查询:验证类型", + "nodeId": "table/test_tablemodel_query.py::test_fields1", + "plmDescription": "测试fields查询:验证类型", + "automationType": "session-python" + }, + "TimechoDB-3138": { + "name": "Python 开源|表模型-查询:测试fields查询:验证字段值", + "nodeId": "table/test_tablemodel_query.py::test_fields2", + "plmDescription": "测试fields查询:验证字段值", + "automationType": "session-python" + }, + "TimechoDB-3139": { + "name": "Python 开源|表模型-查询:测试fields查询:测试is_null、copy和set_xxx_value等方法有效性", + "nodeId": "table/test_tablemodel_query.py::test_fields3", + "plmDescription": "测试fields查询:测试is_null、copy和set_xxx_value等方法有效性", + "automationType": "session-python" + }, + "TimechoDB-3140": { + "name": "Python 开源|表模型-查询:测试fields查询, get_XXX_valu e异常情况", + "nodeId": "table/test_tablemodel_query.py::test_fields_error1", + "plmDescription": "测试fields查询, get_XXX_valu e异常情况", + "automationType": "session-python" + }, + "TimechoDB-3141": { + "name": "Python 开源|表模型-查询:测试 StatementExecutionException 异常", + "nodeId": "table/test_tablemodel_query.py::test_query_error1", + "plmDescription": "测试 StatementExecutionException 异常", + "automationType": "session-python" + }, + "TimechoDB-3142": { + "name": "Python 开源|表模型-会话:测试最简 session 连接:默认url地址为localhost:6667", + "nodeId": "table/test_tablemodel_session.py::test_session1", + "plmDescription": "测试最简 session 连接:默认url地址为localhost:6667", + "automationType": "session-python" + }, + "TimechoDB-3143": { + "name": "Python 开源|表模型-会话:测试最全 session 连接:session指定数据库", + "nodeId": "table/test_tablemodel_session.py::test_session2", + "plmDescription": "测试最全 session 连接:session指定数据库", + "automationType": "session-python" + }, + "TimechoDB-3144": { + "name": "Python 开源|表模型-会话:测试 enable_redirection 参数:关闭重定向", + "nodeId": "table/test_tablemodel_session.py::test_session3", + "plmDescription": "测试 enable_redirection 参数:关闭重定向", + "automationType": "session-python" + }, + "TimechoDB-3145": { + "name": "Python 开源|表模型-会话:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "nodeId": "table/test_tablemodel_session.py::test_session4", + "plmDescription": "测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "automationType": "session-python" + }, + "TimechoDB-3146": { + "name": "Python 开源|表模型-会话:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "nodeId": "table/test_tablemodel_session.py::test_session5", + "plmDescription": "测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "automationType": "session-python" + }, + "TimechoDB-3147": { + "name": "Python 开源|表模型-会话:测试 connection_timeout_in_ms 参数", + "nodeId": "table/test_tablemodel_session.py::test_session6", + "plmDescription": "测试 connection_timeout_in_ms 参数", + "automationType": "session-python" + }, + "TimechoDB-3148": { + "name": "Python 开源|表模型-会话:测试多次 Close", + "nodeId": "table/test_tablemodel_session.py::test_session7", + "plmDescription": "测试多次 Close", + "automationType": "session-python" + }, + "TimechoDB-3149": { + "name": "Python 开源|表模型-会话:IoTDBConnectionException异常:未实现", + "nodeId": "table/test_tablemodel_session.py::test_session_error1", + "plmDescription": "IoTDBConnectionException异常:未实现", + "automationType": "session-python" + }, + "TimechoDB-3150": { + "name": "Python 开源|表模型-会话池:最简 session_pool 连接(node_urls + 显式凭据)", + "nodeId": "table/test_tablemodel_session_pool.py::test_session1", + "plmDescription": "测试最简 session_pool 连接路径:node_urls 来自配置,凭据显式传入(PLM TimechoDB 默认口令非 root/root)。", + "automationType": "session-python" + }, + "TimechoDB-3151": { + "name": "Python 开源|表模型-会话池:测试最全 session 连接:session指定数据库", + "nodeId": "table/test_tablemodel_session_pool.py::test_session2", + "plmDescription": "测试最全 session 连接:session指定数据库", + "automationType": "session-python" + }, + "TimechoDB-3152": { + "name": "Python 开源|表模型-会话池:测试 enable_redirection 参数:关闭重定向", + "nodeId": "table/test_tablemodel_session_pool.py::test_session3", + "plmDescription": "测试 enable_redirection 参数:关闭重定向", + "automationType": "session-python" + }, + "TimechoDB-3153": { + "name": "Python 开源|表模型-会话池:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "nodeId": "table/test_tablemodel_session_pool.py::test_session4", + "plmDescription": "测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "automationType": "session-python" + }, + "TimechoDB-3154": { + "name": "Python 开源|表模型-会话池:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "nodeId": "table/test_tablemodel_session_pool.py::test_session5", + "plmDescription": "测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "automationType": "session-python" + }, + "TimechoDB-3155": { + "name": "Python 开源|表模型-会话池:测试 connection_timeout_in_ms 参数", + "nodeId": "table/test_tablemodel_session_pool.py::test_session6", + "plmDescription": "测试 connection_timeout_in_ms 参数", + "automationType": "session-python" + }, + "TimechoDB-3156": { + "name": "Python 开源|表模型-会话池:测试 max_retry 参数:0, 1, 100, 10000", + "nodeId": "table/test_tablemodel_session_pool.py::test_session8", + "plmDescription": "测试 max_retry 参数:0, 1, 100, 10000", + "automationType": "session-python" + }, + "TimechoDB-3157": { + "name": "Python 开源|表模型-会话池:测试 max_pool_size 参数:0, 1, 100, 10000", + "nodeId": "table/test_tablemodel_session_pool.py::test_session9", + "plmDescription": "测试 max_pool_size 参数:0, 1, 100, 10000", + "automationType": "session-python" + }, + "TimechoDB-3158": { + "name": "Python 开源|树模型-数据库:测试创建数据库:set_storage_group", + "nodeId": "tree/test_treemodel_database.py::test_database1", + "plmDescription": "测试创建数据库:set_storage_group", + "automationType": "session-python" + }, + "TimechoDB-3159": { + "name": "Python 开源|树模型-数据库:测试删除数据库:delete_storage_group 和 delete_storage_groups", + "nodeId": "tree/test_treemodel_database.py::test_database2", + "plmDescription": "测试删除数据库:delete_storage_group 和 delete_storage_groups", + "automationType": "session-python" + }, + "TimechoDB-3160": { + "name": "Python 开源|树模型-数据库:测试delete_storage_group异常:未创建连接而执行或执行时session重连", + "nodeId": "tree/test_treemodel_database.py::test_database_error1", + "plmDescription": "测试delete_storage_group异常:未创建连接而执行或执行时session重连", + "automationType": "session-python" + }, + "TimechoDB-3161": { + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入一条 tablet 数据", + "nodeId": "tree/test_treemodel_insert.py::test_insert_tablet", + "plmDescription": "测试往非对齐时间序列写入一条 tablet 数据", + "automationType": "session-python" + }, + "TimechoDB-3162": { + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入一条 tablet 数据", + "nodeId": "tree/test_treemodel_insert.py::test_insert_aligned_tablet", + "plmDescription": "测试往对齐时间序列写入一条 tablet 数据", + "automationType": "session-python" + }, + "TimechoDB-3163": { + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入多条 tablet 数据", + "nodeId": "tree/test_treemodel_insert.py::test_insert_tablets", + "plmDescription": "测试往非对齐时间序列写入多条 tablet 数据", + "automationType": "session-python" + }, + "TimechoDB-3164": { + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入多条 tablet 数据", + "nodeId": "tree/test_treemodel_insert.py::test_insert_aligned_tablets", + "plmDescription": "测试往对齐时间序列写入多条 tablet 数据", + "automationType": "session-python" + }, + "TimechoDB-3165": { + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入一条 Record 数据", + "nodeId": "tree/test_treemodel_insert.py::test_insert_record", + "plmDescription": "测试往非对齐时间序列写入一条 Record 数据", + "automationType": "session-python" + }, + "TimechoDB-3166": { + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入一条 Record 数据", + "nodeId": "tree/test_treemodel_insert.py::test_insert_aligned_record", + "plmDescription": "测试往对齐时间序列写入一条 Record 数据", + "automationType": "session-python" + }, + "TimechoDB-3167": { + "name": "Python 开源|树模型-写入:测试往非对齐时间序列写入多条 Record 数据", + "nodeId": "tree/test_treemodel_insert.py::test_insert_records", + "plmDescription": "测试往非对齐时间序列写入多条 Record 数据", + "automationType": "session-python" + }, + "TimechoDB-3168": { + "name": "Python 开源|树模型-写入:测试往对齐时间序列写入多条 Record 数据", + "nodeId": "tree/test_treemodel_insert.py::test_insert_aligned_records", + "plmDescription": "测试往对齐时间序列写入多条 Record 数据", + "automationType": "session-python" + }, + "TimechoDB-3169": { + "name": "Python 开源|树模型-写入:测试插入同属于一个非对齐 device 的多个 Record 数据", + "nodeId": "tree/test_treemodel_insert.py::test_insert_records_of_one_device", + "plmDescription": "测试插入同属于一个非对齐 device 的多个 Record 数据", + "automationType": "session-python" + }, + "TimechoDB-3170": { + "name": "Python 开源|树模型-写入:测试插入同属于一个对齐 device 的多个 Record 数据", + "nodeId": "tree/test_treemodel_insert.py::test_insert_aligned_records_of_one_device", + "plmDescription": "测试插入同属于一个对齐 device 的多个 Record 数据", + "automationType": "session-python" + }, + "TimechoDB-3171": { + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:写入单条记录", + "nodeId": "tree/test_treemodel_insert.py::test_insert_str_record", + "plmDescription": "测试带有类型推断的写入:写入单条记录", + "automationType": "session-python" + }, + "TimechoDB-3172": { + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:写入单条对齐记录", + "nodeId": "tree/test_treemodel_insert.py::test_insert_aligned_str_record", + "plmDescription": "测试带有类型推断的写入:写入单条对齐记录", + "automationType": "session-python" + }, + "TimechoDB-3173": { + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录", + "nodeId": "tree/test_treemodel_insert.py::test_insert_string_records_of_one_device", + "plmDescription": "测试带有类型推断的写入:往一个设备中写入多条记录", + "automationType": "session-python" + }, + "TimechoDB-3174": { + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "nodeId": "tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device", + "plmDescription": "测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "automationType": "session-python" + }, + "TimechoDB-3175": { + "name": "Python 开源|树模型-写入:测试直接写入", + "nodeId": "tree/test_treemodel_insert.py::test_insert_direct", + "plmDescription": "测试直接写入", + "automationType": "session-python" + }, + "TimechoDB-3176": { + "name": "Python 开源|树模型-写入:测试删除多个时间序列全部的数据", + "nodeId": "tree/test_treemodel_insert.py::test_delete_data1", + "plmDescription": "测试删除多个时间序列全部的数据", + "automationType": "session-python" + }, + "TimechoDB-3177": { + "name": "Python 开源|树模型-写入:测试删除多个时间序列指定范围的数据(删除全部数据)", + "nodeId": "tree/test_treemodel_insert.py::test_delete_data2", + "plmDescription": "测试删除多个时间序列指定范围的数据(删除全部数据)", + "automationType": "session-python" + }, + "TimechoDB-3178": { + "name": "Python 开源|树模型-写入:测试检查顺序函数:check_sorted", + "nodeId": "tree/test_treemodel_insert.py::test_check_sorted", + "plmDescription": "测试检查顺序函数:check_sorted", + "automationType": "session-python" + }, + "TimechoDB-3179": { + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录", + "nodeId": "tree/test_treemodel_insert.py::test_insert_string_records_of_one_device_error", + "plmDescription": "测试带有类型推断的写入:往一个设备中写入多条记录", + "automationType": "session-python" + }, + "TimechoDB-3180": { + "name": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "nodeId": "tree/test_treemodel_insert.py::test_insert_aligned_string_records_of_one_device_error", + "plmDescription": "测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "automationType": "session-python" + }, + "TimechoDB-3181": { + "name": "Python 开源|树模型-写入:测试insert_records数量不一致情况", + "nodeId": "tree/test_treemodel_insert.py::test_insert_records_error", + "plmDescription": "测试insert_records数量不一致情况", + "automationType": "session-python" + }, + "TimechoDB-3182": { + "name": "Python 开源|树模型-写入:测试 insert_str_record 数量不一致情况", + "nodeId": "tree/test_treemodel_insert.py::test_insert_str_record_error", + "plmDescription": "测试 insert_str_record 数量不一致情况", + "automationType": "session-python" + }, + "TimechoDB-3183": { + "name": "Python 开源|树模型-写入:测试 insert_record 数量不一致情况", + "nodeId": "tree/test_treemodel_insert.py::test_insert_record_error", + "plmDescription": "测试 insert_record 数量不一致情况", + "automationType": "session-python" + }, + "TimechoDB-3184": { + "name": "Python 开源|树模型-查询:测试 execute_query_statement 函数", + "nodeId": "tree/test_treemodel_query.py::test_execute_query_statement", + "plmDescription": "测试 execute_query_statement 函数", + "automationType": "session-python" + }, + "TimechoDB-3185": { + "name": "Python 开源|树模型-查询:测试 execute_raw_data_query 函数", + "nodeId": "tree/test_treemodel_query.py::test_execute_raw_data_query", + "plmDescription": "测试 execute_raw_data_query 函数", + "automationType": "session-python" + }, + "TimechoDB-3186": { + "name": "Python 开源|树模型-查询:测试 execute_last_data_query 函数", + "nodeId": "tree/test_treemodel_query.py::test_execute_last_data_query", + "plmDescription": "测试 execute_last_data_query 函数", + "automationType": "session-python" + }, + "TimechoDB-3187": { + "name": "Python 开源|树模型-会话:最简 session 连接(host/port + 显式凭据)", + "nodeId": "tree/test_treemodel_session.py::test_session1", + "plmDescription": "测试最简 session 连接路径:host/port 来自配置,凭据显式传入(PLM TimechoDB 默认口令非 root/root)。", + "automationType": "session-python" + }, + "TimechoDB-3188": { + "name": "Python 开源|树模型-会话:测试session连接:最繁构造", + "nodeId": "tree/test_treemodel_session.py::test_session2", + "plmDescription": "测试session连接:最繁构造", + "automationType": "session-python" + }, + "TimechoDB-3189": { + "name": "Python 开源|树模型-会话:测试session连接:多次open", + "nodeId": "tree/test_treemodel_session.py::test_session3", + "plmDescription": "测试session连接:多次open", + "automationType": "session-python" + }, + "TimechoDB-3190": { + "name": "Python 开源|树模型-会话:测试session连接:多次close", + "nodeId": "tree/test_treemodel_session.py::test_session4", + "plmDescription": "测试session连接:多次close", + "automationType": "session-python" + }, + "TimechoDB-3191": { + "name": "Python 开源|树模型-会话:测试session连接:close后再open", + "nodeId": "tree/test_treemodel_session.py::test_session5", + "plmDescription": "测试session连接:close后再open", + "automationType": "session-python" + }, + "TimechoDB-3192": { + "name": "Python 开源|树模型-会话:测试超时连接:需要手动测试,不清楚具体多久会超时", + "nodeId": "tree/test_treemodel_session.py::test_session6", + "plmDescription": "测试超时连接:需要手动测试,不清楚具体多久会超时", + "automationType": "session-python" + }, + "TimechoDB-3193": { + "name": "Python 开源|树模型-会话:测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置", + "nodeId": "tree/test_treemodel_session.py::test_session7", + "plmDescription": "测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置", + "automationType": "session-python" + }, + "TimechoDB-3194": { + "name": "Python 开源|树模型-会话:测试session的get_time_zone和set_time_zone函数", + "nodeId": "tree/test_treemodel_session.py::test_session8", + "plmDescription": "测试session的get_time_zone和set_time_zone函数", + "automationType": "session-python" + }, + "TimechoDB-3195": { + "name": "Python 开源|树模型-会话:测试session的 execute_statement 函数", + "nodeId": "tree/test_treemodel_session.py::test_session9", + "plmDescription": "测试session的 execute_statement 函数", + "automationType": "session-python" + }, + "TimechoDB-3196": { + "name": "Python 开源|树模型-会话:测试session的 execute_non_query_statement 和 execute_query_statement 函数", + "nodeId": "tree/test_treemodel_session.py::test_session10", + "plmDescription": "测试session的 execute_non_query_statement 和 execute_query_statement 函数", + "automationType": "session-python" + }, + "TimechoDB-3197": { + "name": "Python 开源|树模型-会话:测试session的 execute_non_query_statement函数异常情况", + "nodeId": "tree/test_treemodel_session.py::test_session_error2", + "plmDescription": "测试session的 execute_non_query_statement函数异常情况", + "automationType": "session-python" + }, + "TimechoDB-3198": { + "name": "Python 开源|树模型-会话:测试session的 execute_query_statement函数异常情况", + "nodeId": "tree/test_treemodel_session.py::test_session_error3", + "plmDescription": "测试session的 execute_query_statement函数异常情况", + "automationType": "session-python" + }, + "TimechoDB-3199": { + "name": "Python 开源|树模型-会话:测试session的 execute_statement函数异常情况", + "nodeId": "tree/test_treemodel_session.py::test_session_error4", + "plmDescription": "测试session的 execute_statement函数异常情况", + "automationType": "session-python" + }, + "TimechoDB-3200": { + "name": "Python 开源|树模型-会话:测试session的set_time_zone函数异常情况", + "nodeId": "tree/test_treemodel_session.py::test_session_error5", + "plmDescription": "测试session的set_time_zone函数异常情况", + "automationType": "session-python" + }, + "TimechoDB-3201": { + "name": "Python 开源|树模型-会话池:测试session_pool:最简构造", + "nodeId": "tree/test_treemodel_session_pool.py::test_session_pool1", + "plmDescription": "测试session_pool:最简构造", + "automationType": "session-python" + }, + "TimechoDB-3202": { + "name": "Python 开源|树模型-会话池:测试session_pool:最繁构造", + "nodeId": "tree/test_treemodel_session_pool.py::test_session_pool2", + "plmDescription": "测试session_pool:最繁构造", + "automationType": "session-python" + }, + "TimechoDB-3203": { + "name": "Python 开源|树模型-会话池:测试SessionPool的SSL连接", + "nodeId": "tree/test_treemodel_session_pool.py::test_session_pool3", + "plmDescription": "测试SessionPool的SSL连接", + "automationType": "session-python" + }, + "TimechoDB-3204": { + "name": "Python 开源|树模型-会话池:测试session_pool:无node_urls", + "nodeId": "tree/test_treemodel_session_pool.py::test_session_pool4", + "plmDescription": "测试session_pool:无node_urls", + "automationType": "session-python" + }, + "TimechoDB-3205": { + "name": "Python 开源|树模型-会话池:测试session_pool:push_back的session未open", + "nodeId": "tree/test_treemodel_session_pool.py::test_session_pool5", + "plmDescription": "测试session_pool:push_back的session未open", + "automationType": "session-python" + }, + "TimechoDB-3206": { + "name": "Python 开源|树模型-会话池:测试session_pool:node_urls为None", + "nodeId": "tree/test_treemodel_session_pool.py::test_session_pool_error1", + "plmDescription": "测试session_pool:node_urls为None", + "automationType": "session-python" + }, + "TimechoDB-3207": { + "name": "Python 开源|树模型-会话池:测试session_pool:get_session前关闭session_pool", + "nodeId": "tree/test_treemodel_session_pool.py::test_session_pool_error2", + "plmDescription": "测试session_pool:get_session前关闭session_pool", + "automationType": "session-python" + }, + "TimechoDB-3208": { + "name": "Python 开源|树模型-会话池:测试session_pool:put_back的session_pool已经close", + "nodeId": "tree/test_treemodel_session_pool.py::test_session_pool_error3", + "plmDescription": "测试session_pool:put_back的session_pool已经close", + "automationType": "session-python" + }, + "TimechoDB-3209": { + "name": "Python 开源|树模型-会话池:测试session_pool:创建session_pool时,max_pool_size <= 0", + "nodeId": "tree/test_treemodel_session_pool.py::test_session_pool_error4", + "plmDescription": "测试session_pool:创建session_pool时,max_pool_size <= 0", + "automationType": "session-python" + }, + "TimechoDB-3210": { + "name": "Python 开源|树模型-时间序列:测试创建非对齐时间序列:create_time_series", + "nodeId": "tree/test_treemodel_timeseries.py::test_timeseries1", + "plmDescription": "测试创建非对齐时间序列:create_time_series", + "automationType": "session-python" + }, + "TimechoDB-3211": { + "name": "Python 开源|树模型-时间序列:测试创建对齐时间序列:create_aligned_time_series", + "nodeId": "tree/test_treemodel_timeseries.py::test_aligned_timeseries1", + "plmDescription": "测试创建对齐时间序列:create_aligned_time_series", + "automationType": "session-python" + }, + "TimechoDB-3212": { + "name": "Python 开源|树模型-时间序列:测试创建多个非对齐时间序列", + "nodeId": "tree/test_treemodel_timeseries.py::test_multi_timeseries1", + "plmDescription": "测试创建多个非对齐时间序列", + "automationType": "session-python" + }, + "TimechoDB-3213": { + "name": "Python 开源|树模型-时间序列:测试删除时间序列:session.delete_time_series()", + "nodeId": "tree/test_treemodel_timeseries.py::test_delete_timeseries1", + "plmDescription": "测试删除时间序列:session.delete_time_series()", + "automationType": "session-python" + }, + "TimechoDB-3214": { + "name": "Python 开源|树模型-时间序列:测试检查时间序列是否存在:check_time_series_exists", + "nodeId": "tree/test_treemodel_timeseries.py::test_check_timeseries_exists1", + "plmDescription": "测试检查时间序列是否存在:check_time_series_exists", + "automationType": "session-python" + } +} diff --git a/.plm-cn-names.json b/.plm-cn-names.json new file mode 100644 index 0000000..5cfd342 --- /dev/null +++ b/.plm-cn-names.json @@ -0,0 +1,90 @@ +{ + "TimechoDB-3127": "Python 开源|表模型-写入:测试一般写入数据", + "TimechoDB-3128": "Python 开源|表模型-写入:测试Numpy_tablet写入数据", + "TimechoDB-3129": "Python 开源|表模型-写入:测试直接写入数据", + "TimechoDB-3130": "Python 开源|表模型-写入:乱序写入:测试时间戳自动排序功能", + "TimechoDB-3131": "Python 开源|表模型-写入:错误情况:时间戳长度和值长度不一致", + "TimechoDB-3132": "Python 开源|表模型-查询:测试SessionDataSet:验证列类型和数据类型以及行数的正确性", + "TimechoDB-3133": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 总行数超过 fetchSize 时", + "TimechoDB-3134": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数小于 fetchSize 时", + "TimechoDB-3135": "Python 开源|表模型-查询:测试查询分批返回 DataFrame 功能:当 SessionDataSet 剩余的行数等于 fetchSize 时", + "TimechoDB-3136": "Python 开源|表模型-查询:测试 fetchSize <= 0 的异常:Session 打印一个警告日志 ,fetchSize 重置为默认值 5000", + "TimechoDB-3137": "Python 开源|表模型-查询:测试fields查询:验证类型", + "TimechoDB-3138": "Python 开源|表模型-查询:测试fields查询:验证字段值", + "TimechoDB-3139": "Python 开源|表模型-查询:测试fields查询:测试is_null、copy和set_xxx_value等方法有效性", + "TimechoDB-3140": "Python 开源|表模型-查询:测试fields查询, get_XXX_valu e异常情况", + "TimechoDB-3141": "Python 开源|表模型-查询:测试 StatementExecutionException 异常", + "TimechoDB-3142": "Python 开源|表模型-会话:测试最简 session 连接:默认url地址为localhost:6667", + "TimechoDB-3143": "Python 开源|表模型-会话:测试最全 session 连接:session指定数据库", + "TimechoDB-3144": "Python 开源|表模型-会话:测试 enable_redirection 参数:关闭重定向", + "TimechoDB-3145": "Python 开源|表模型-会话:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "TimechoDB-3146": "Python 开源|表模型-会话:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "TimechoDB-3147": "Python 开源|表模型-会话:测试 connection_timeout_in_ms 参数", + "TimechoDB-3148": "Python 开源|表模型-会话:测试多次 Close", + "TimechoDB-3149": "Python 开源|表模型-会话:IoTDBConnectionException异常:未实现", + "TimechoDB-3150": "Python 开源|表模型-会话池:最简 session_pool 连接(node_urls + 显式凭据)", + "TimechoDB-3151": "Python 开源|表模型-会话池:测试最全 session 连接:session指定数据库", + "TimechoDB-3152": "Python 开源|表模型-会话池:测试 enable_redirection 参数:关闭重定向", + "TimechoDB-3153": "Python 开源|表模型-会话池:测试 enable_compression 参数:开启RPC压缩(需要单独测试,IoTDB需要开启对应配置)", + "TimechoDB-3154": "Python 开源|表模型-会话池:测试 use_ssl 参数:开启SSL连接(需要单独测试,生成并存放密钥)", + "TimechoDB-3155": "Python 开源|表模型-会话池:测试 connection_timeout_in_ms 参数", + "TimechoDB-3156": "Python 开源|表模型-会话池:测试 max_retry 参数:0, 1, 100, 10000", + "TimechoDB-3157": "Python 开源|表模型-会话池:测试 max_pool_size 参数:0, 1, 100, 10000", + "TimechoDB-3158": "Python 开源|树模型-数据库:测试创建数据库:set_storage_group", + "TimechoDB-3159": "Python 开源|树模型-数据库:测试删除数据库:delete_storage_group 和 delete_storage_groups", + "TimechoDB-3160": "Python 开源|树模型-数据库:测试delete_storage_group异常:未创建连接而执行或执行时session重连", + "TimechoDB-3161": "Python 开源|树模型-写入:测试往非对齐时间序列写入一条 tablet 数据", + "TimechoDB-3162": "Python 开源|树模型-写入:测试往对齐时间序列写入一条 tablet 数据", + "TimechoDB-3163": "Python 开源|树模型-写入:测试往非对齐时间序列写入多条 tablet 数据", + "TimechoDB-3164": "Python 开源|树模型-写入:测试往对齐时间序列写入多条 tablet 数据", + "TimechoDB-3165": "Python 开源|树模型-写入:测试往非对齐时间序列写入一条 Record 数据", + "TimechoDB-3166": "Python 开源|树模型-写入:测试往对齐时间序列写入一条 Record 数据", + "TimechoDB-3167": "Python 开源|树模型-写入:测试往非对齐时间序列写入多条 Record 数据", + "TimechoDB-3168": "Python 开源|树模型-写入:测试往对齐时间序列写入多条 Record 数据", + "TimechoDB-3169": "Python 开源|树模型-写入:测试插入同属于一个非对齐 device 的多个 Record 数据", + "TimechoDB-3170": "Python 开源|树模型-写入:测试插入同属于一个对齐 device 的多个 Record 数据", + "TimechoDB-3171": "Python 开源|树模型-写入:测试带有类型推断的写入:写入单条记录", + "TimechoDB-3172": "Python 开源|树模型-写入:测试带有类型推断的写入:写入单条对齐记录", + "TimechoDB-3173": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录", + "TimechoDB-3174": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "TimechoDB-3175": "Python 开源|树模型-写入:测试直接写入", + "TimechoDB-3176": "Python 开源|树模型-写入:测试删除多个时间序列全部的数据", + "TimechoDB-3177": "Python 开源|树模型-写入:测试删除多个时间序列指定范围的数据(删除全部数据)", + "TimechoDB-3178": "Python 开源|树模型-写入:测试检查顺序函数:check_sorted", + "TimechoDB-3179": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条记录", + "TimechoDB-3180": "Python 开源|树模型-写入:测试带有类型推断的写入:往一个设备中写入多条对齐记录", + "TimechoDB-3181": "Python 开源|树模型-写入:测试insert_records数量不一致情况", + "TimechoDB-3182": "Python 开源|树模型-写入:测试 insert_str_record 数量不一致情况", + "TimechoDB-3183": "Python 开源|树模型-写入:测试 insert_record 数量不一致情况", + "TimechoDB-3184": "Python 开源|树模型-查询:测试 execute_query_statement 函数", + "TimechoDB-3185": "Python 开源|树模型-查询:测试 execute_raw_data_query 函数", + "TimechoDB-3186": "Python 开源|树模型-查询:测试 execute_last_data_query 函数", + "TimechoDB-3187": "Python 开源|树模型-会话:最简 session 连接(host/port + 显式凭据)", + "TimechoDB-3188": "Python 开源|树模型-会话:测试session连接:最繁构造", + "TimechoDB-3189": "Python 开源|树模型-会话:测试session连接:多次open", + "TimechoDB-3190": "Python 开源|树模型-会话:测试session连接:多次close", + "TimechoDB-3191": "Python 开源|树模型-会话:测试session连接:close后再open", + "TimechoDB-3192": "Python 开源|树模型-会话:测试超时连接:需要手动测试,不清楚具体多久会超时", + "TimechoDB-3193": "Python 开源|树模型-会话:测试Session的SSL连接:需要手动测试,测试时请将use_ssl设置为True,并开启iotdb对应配置", + "TimechoDB-3194": "Python 开源|树模型-会话:测试session的get_time_zone和set_time_zone函数", + "TimechoDB-3195": "Python 开源|树模型-会话:测试session的 execute_statement 函数", + "TimechoDB-3196": "Python 开源|树模型-会话:测试session的 execute_non_query_statement 和 execute_query_statement 函数", + "TimechoDB-3197": "Python 开源|树模型-会话:测试session的 execute_non_query_statement函数异常情况", + "TimechoDB-3198": "Python 开源|树模型-会话:测试session的 execute_query_statement函数异常情况", + "TimechoDB-3199": "Python 开源|树模型-会话:测试session的 execute_statement函数异常情况", + "TimechoDB-3200": "Python 开源|树模型-会话:测试session的set_time_zone函数异常情况", + "TimechoDB-3201": "Python 开源|树模型-会话池:测试session_pool:最简构造", + "TimechoDB-3202": "Python 开源|树模型-会话池:测试session_pool:最繁构造", + "TimechoDB-3203": "Python 开源|树模型-会话池:测试SessionPool的SSL连接", + "TimechoDB-3204": "Python 开源|树模型-会话池:测试session_pool:无node_urls", + "TimechoDB-3205": "Python 开源|树模型-会话池:测试session_pool:push_back的session未open", + "TimechoDB-3206": "Python 开源|树模型-会话池:测试session_pool:node_urls为None", + "TimechoDB-3207": "Python 开源|树模型-会话池:测试session_pool:get_session前关闭session_pool", + "TimechoDB-3208": "Python 开源|树模型-会话池:测试session_pool:put_back的session_pool已经close", + "TimechoDB-3209": "Python 开源|树模型-会话池:测试session_pool:创建session_pool时,max_pool_size <= 0", + "TimechoDB-3210": "Python 开源|树模型-时间序列:测试创建非对齐时间序列:create_time_series", + "TimechoDB-3211": "Python 开源|树模型-时间序列:测试创建对齐时间序列:create_aligned_time_series", + "TimechoDB-3212": "Python 开源|树模型-时间序列:测试创建多个非对齐时间序列", + "TimechoDB-3213": "Python 开源|树模型-时间序列:测试删除时间序列:session.delete_time_series()", + "TimechoDB-3214": "Python 开源|树模型-时间序列:测试检查时间序列是否存在:check_time_series_exists" +} From 3c9e7eed623564252b3d344735aa0c0e653be45c Mon Sep 17 00:00:00 2001 From: LinJieXiao-XLJ Date: Thu, 5 Nov 2026 16:25:01 +0800 Subject: [PATCH 6/7] =?UTF-8?q?docs(plm):=20=E8=A1=A5=E5=85=85=20Python=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=208GB=20=E5=AE=9E=E4=BE=8B=2088/88=20?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Code --- docs/plm-case-review.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/plm-case-review.md b/docs/plm-case-review.md index 501db0b..d9763e1 100644 --- a/docs/plm-case-review.md +++ b/docs/plm-case-review.md @@ -108,3 +108,9 @@ - 本轮无命名分歧;如后续发现用例名与测试内容不符,在本文件追加“待审查”记录。 - 环境差异记录:111 为开源版默认 root/root;PLM 的 TimechoDB 实例默认口令为 TimechoDB@2021。`tree/test_treemodel_session.py::test_session1` 原用 2 参构造(默认 root/root)会 801,已改为显式传 config 凭据,用例名同步改为“最简 session 连接(host/port + 显式凭据)”;`table/test_tablemodel_session_pool.py::test_session1` 同理改为显式传 node_urls/凭据。 +## 三、PLM 环境验证(2026-11-05) + +- **8GB 手动实例**(`py-large-test`,TimechoDB 2.0.10.2,192.168.99.51:30891):88 条全量 **88 passed in 742.91s**。 +- **2GB Native 模板实例**:`test_query5` 报 `719: There is not enough memory...`(剩余 31MB,需要 37MB);树模型插入用例出现连接中断。 +- 结论:Python 全量需要把产品 Native 模板实例内存提高到 **8GB(至少 6GB)** 并重新检验;2GB 仅够轻量用例。 +- 此前失败的 11 条(`test_query5`、`table/test_tablemodel_session_pool.py::test_session1`、树模型插入 9 条)在 8GB 实例上全部通过。 From c1c2cb435f9b465e7199e1cdc48e0ee985b6494c Mon Sep 17 00:00:00 2001 From: LinJieXiao-XLJ <1546674204@qq.com> Date: Fri, 13 Nov 2026 08:46:09 +0800 Subject: [PATCH 7/7] =?UTF-8?q?fix(plm):=20=E4=BF=AE=E6=AD=A3=20PyPI=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=20session/statement=20id=20?= =?UTF-8?q?=E4=BC=A0=E5=8F=8D=E5=AF=BC=E8=87=B4=E7=9A=84=20803?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apache-iotdb 2.0.11 发布包的 execute_query_statement / execute_statement / execute_raw_data_query 用位置参数构造结果集,把 session_id 与 statement_id 传反;TimechoDB 2.0.13.x 的 fetchResultsV2 新增查询归属校验后,第二次及 以后的 fetch 会报 803 "The requested query does not belong to the current session.",仅多页查询触发。 在 conftest 中检测到缺陷方法时进程内包裹,把结果集内部 id 校正回 Session 自己的值;execute_last_data_query 本身正确,不受影响。 Co-Authored-By: Claude Code --- tests/conftest.py | 64 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 2f3ddf5..5f6a140 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,7 +6,9 @@ 到 127.0.0.1。本地手工运行不设置这些环境变量时行为不变。 """ +import inspect import os +import re import sys import yaml @@ -14,6 +16,68 @@ _original_safe_load = yaml.safe_load _printed_endpoint = False +# apache-iotdb 2.0.11 PyPI 发布包的部分查询方法用位置参数构造 SessionDataSet 时, +# 把 session_id 和 statement_id 传反了(源码快照用关键字参数,没有这个问题)。 +# TimechoDB 2.0.13.x 的 fetchResultsV2 会校验 (statement_id, query_id) 属于当前 +# 会话,两个 id 不一致时多页查询返回 803 "The requested query does not belong +# to the current session."。这里在进程内把已构造结果集的内部 id 校正回 Session +# 自己的值;只包裹检测到缺陷的方法,正常客户端/execute_last_data_query 不受影响。 +_BROKEN_CLIENT_METHODS = ( + "execute_query_statement", + "execute_statement", + "execute_raw_data_query", +) + + +def _patch_iotdb_client_session_ids() -> None: + try: + from iotdb.Session import Session + except ImportError: + return + + broken = [] + for name in _BROKEN_CLIENT_METHODS: + method = getattr(Session, name, None) + if method is None or getattr(method, "__plm_session_id_fixed__", False): + continue + try: + source = inspect.getsource(method) + except (OSError, TypeError): + continue + compact = re.sub(r"\s+", "", source) + # 缺陷顺序:query_id, session_id, client, statement_id + if "self.__session_id,self.__client,self.__statement_id," in compact: + broken.append(name) + + for name in broken: + original = getattr(Session, name) + + def wrapper(self, *args, __original=original, **kwargs): + dataset = __original(self, *args, **kwargs) + try: + rpc_dataset = dataset.iotdb_rpc_data_set + rpc_dataset._IoTDBRpcDataSet__session_id = self._Session__session_id + rpc_dataset._IoTDBRpcDataSet__statement_id = self._Session__statement_id + except AttributeError: + pass + return dataset + + wrapper.__name__ = original.__name__ + wrapper.__doc__ = original.__doc__ + wrapper.__plm_session_id_fixed__ = True + setattr(Session, name, wrapper) + + if broken: + print( + "[plm] 检测到 apache-iotdb 发布包 session/statement id 参数顺序缺陷" + f"({', '.join(broken)}),已在进程内修正", + file=sys.stderr, + flush=True, + ) + + +_patch_iotdb_client_session_ids() + def _env(name): value = os.environ.get(name)