未验证 提交 424ef567 编写于 作者: X xiaolei li 提交者: GitHub

[TD-13948]<fix>:csharp connector test case add database fixture and e… (#10793)

* [TD-13948]<fix>:csharp connector test case add database fixture and execute order

* [TD-13948]<fix>:run CI
上级 b0824d55
...@@ -4,19 +4,32 @@ using TDengineDriver; ...@@ -4,19 +4,32 @@ using TDengineDriver;
using System.Collections.Generic; using System.Collections.Generic;
using Xunit; using Xunit;
using Test.UtilsTools.ResultSet; using Test.UtilsTools.ResultSet;
using Test.Fixture;
using Test.Case.Attributes;
namespace Cases namespace Cases
{ {
public class FetchFieldsCases [TestCaseOrderer("XUnit.Case.Orderers.TestExeOrderer", "Cases.ExeOrder")]
[Collection("Database collection")]
public class FetchFieldCases
{ {
DatabaseFixture database;
public FetchFieldCases(DatabaseFixture fixture)
{
this.database = fixture;
}
/// <author>xiaolei</author> /// <author>xiaolei</author>
/// <Name>FetchFieldsCases.TestFetchFieldsJsonTag</Name> /// <Name>FetchFieldsCases.TestFetchFieldsJsonTag</Name>
/// <describe>test taos_fetch_fields(), check the meta data</describe> /// <describe>test taos_fetch_fields(), check the meta data</describe>
/// <filename>FetchFields.cs</filename> /// <filename>FetchFields.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "FetchFieldsCases.TestFetchFieldsJsonTag()")] [Fact(DisplayName = "FetchFieldsCases.TestFetchFieldJsonTag()"),TestExeOrder(1),Trait("Category", "FetchFieldJsonTag")]
public void TestFetchFieldsJsonTag() public void TestFetchFieldJsonTag()
{ {
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
IntPtr _res = IntPtr.Zero; IntPtr _res = IntPtr.Zero;
string tableName = "fetch_fields"; string tableName = "fetch_fields";
var expectResMeta = new List<TDengineMeta> { var expectResMeta = new List<TDengineMeta> {
......
...@@ -4,8 +4,11 @@ using System.Collections.Generic; ...@@ -4,8 +4,11 @@ using System.Collections.Generic;
using Xunit; using Xunit;
using TDengineDriver; using TDengineDriver;
using Test.UtilsTools.ResultSet; using Test.UtilsTools.ResultSet;
using Test.Case.Attributes;
namespace Cases namespace Cases
{ {
[TestCaseOrderer("XUnit.Case.Orderers.TestExeOrderer", "Cases.ExeOrder")]
public class FetchLengthCase public class FetchLengthCase
{ {
/// <author>xiaolei</author> /// <author>xiaolei</author>
...@@ -13,7 +16,7 @@ namespace Cases ...@@ -13,7 +16,7 @@ namespace Cases
/// <describe>TD-12103 C# connector fetch_row with binary data retrieving error</describe> /// <describe>TD-12103 C# connector fetch_row with binary data retrieving error</describe>
/// <filename>FetchLength.cs</filename> /// <filename>FetchLength.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "Skip FetchLengthCase.TestRetrieveBinary()")] [Fact(DisplayName = "FetchLengthCase.TestRetrieveBinary()"),TestExeOrder(1)]
public void TestRetrieveBinary() public void TestRetrieveBinary()
{ {
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = UtilsTools.TDConnection();
......
...@@ -5,19 +5,28 @@ using Test.UtilsTools.DataSource; ...@@ -5,19 +5,28 @@ using Test.UtilsTools.DataSource;
using Xunit; using Xunit;
using System.Collections.Generic; using System.Collections.Generic;
using Test.UtilsTools.ResultSet; using Test.UtilsTools.ResultSet;
using Test.Case.Attributes;
using Test.Fixture;
namespace Cases namespace Cases
{ {
[TestCaseOrderer("XUnit.Case.Orderers.TestExeOrderer", "Cases.ExeOrder")]
[Collection("Database collection")]
public class InsertCNCases public class InsertCNCases
{ {
DatabaseFixture database;
public InsertCNCases(DatabaseFixture fixture)
{
this.database = fixture;
}
/// <author>xiaolei</author> /// <author>xiaolei</author>
/// <Name>InsertCNCases.TestNTable</Name> /// <Name>InsertCNCases.TestNTable</Name>
/// <describe>Test insert Chinese characters into normal table's nchar column</describe> /// <describe>Test insert Chinese characters into normal table's nchar column</describe>
/// <filename>InsertCn.cs</filename> /// <filename>InsertCn.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "InsertCNCases.TestNTable()")] [Fact(DisplayName = "InsertCNCases.TestNTable"), TestExeOrder(1)]
public void TestNTable() public void TestNTable()
{ {
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
IntPtr _res = IntPtr.Zero; IntPtr _res = IntPtr.Zero;
string tableName = "cn_insert_nchar_ntable"; string tableName = "cn_insert_nchar_ntable";
// var expectResData = new List<String> { "1637064040000", "true", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "XI", "XII", "{\"k1\": \"v1\"}" }; // var expectResData = new List<String> { "1637064040000", "true", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "XI", "XII", "{\"k1\": \"v1\"}" };
...@@ -68,10 +77,10 @@ namespace Cases ...@@ -68,10 +77,10 @@ namespace Cases
/// <describe>test insert Chinese character into stable's nchar column,both tag and column</describe> /// <describe>test insert Chinese character into stable's nchar column,both tag and column</describe>
/// <filename>InsertCn.cs</filename> /// <filename>InsertCn.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "InsertCNCases.TestSTable()")] [Fact(DisplayName = "InsertCNCases.TestSTable()"), TestExeOrder(2)]
public void TestSTable() public void TestSTable()
{ {
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
IntPtr _res = IntPtr.Zero; IntPtr _res = IntPtr.Zero;
string tableName = "cn_insert_nchar_stable"; string tableName = "cn_insert_nchar_stable";
var colData = new List<Object>{1637064040000,1,"涛思数据", var colData = new List<Object>{1637064040000,1,"涛思数据",
...@@ -122,10 +131,10 @@ namespace Cases ...@@ -122,10 +131,10 @@ namespace Cases
/// <describe>test insert Chinese character into normal table's multiple nchar columns</describe> /// <describe>test insert Chinese character into normal table's multiple nchar columns</describe>
/// <filename>InsertCn.cs</filename> /// <filename>InsertCn.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "InsertCNCases.TestInsertMultiNTable()")] [Fact(DisplayName = "InsertCNCases.TestInsertMultiNTable()"), TestExeOrder(3)]
public void TestInsertMultiNTable() public void TestInsertMultiNTable()
{ {
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
IntPtr _res = IntPtr.Zero; IntPtr _res = IntPtr.Zero;
string tableName = "cn_multi_insert_nchar_ntable"; string tableName = "cn_multi_insert_nchar_ntable";
var colData = new List<Object>{1637064040000,1,"涛思数据","保利广场","Beijing","China", var colData = new List<Object>{1637064040000,1,"涛思数据","保利广场","Beijing","China",
...@@ -140,7 +149,7 @@ namespace Cases ...@@ -140,7 +149,7 @@ namespace Cases
}; };
String dropTb = "drop table if exists " + tableName; String dropTb = "drop table if exists " + tableName;
String createTb = $"create table if not exists {tableName} (ts timestamp,v4 int,blob nchar(200),location nchar(200),city binary(100),country binary(200));"; String createTb = $"create table if not exists {tableName} (ts timestamp,v4 int,blob nchar(200),location nchar(200),city binary(100),coutry binary(200));";
String insertSql = UtilsTools.ConstructInsertSql(tableName, "", colData, null, 9); String insertSql = UtilsTools.ConstructInsertSql(tableName, "", colData, null, 9);
String selectSql = "select * from " + tableName; String selectSql = "select * from " + tableName;
String dropSql = "drop table " + tableName; String dropSql = "drop table " + tableName;
...@@ -174,10 +183,10 @@ namespace Cases ...@@ -174,10 +183,10 @@ namespace Cases
/// <describe>test insert Chinese character into stable's multiple nchar columns</describe> /// <describe>test insert Chinese character into stable's multiple nchar columns</describe>
/// <filename>InsertCn.cs</filename> /// <filename>InsertCn.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "InsertCNCases.TestInsertMultiSTable()")] [Fact(DisplayName = "InsertCNCases.TestInsertMultiSTable()"), TestExeOrder(4)]
public void TestInsertMultiSTable() public void TestInsertMultiSTable()
{ {
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
IntPtr _res = IntPtr.Zero; IntPtr _res = IntPtr.Zero;
string tableName = "cn_multi_insert_nchar_stable"; string tableName = "cn_multi_insert_nchar_stable";
var colData = new List<Object>{1637064040000,1,"涛思数据","保利广场","Beijing","China", var colData = new List<Object>{1637064040000,1,"涛思数据","保利广场","Beijing","China",
...@@ -233,4 +242,4 @@ namespace Cases ...@@ -233,4 +242,4 @@ namespace Cases
} }
} }
} }
} }
\ No newline at end of file
...@@ -5,16 +5,27 @@ using Test.UtilsTools.DataSource; ...@@ -5,16 +5,27 @@ using Test.UtilsTools.DataSource;
using Xunit; using Xunit;
using System.Collections.Generic; using System.Collections.Generic;
using Test.UtilsTools.ResultSet; using Test.UtilsTools.ResultSet;
using Test.Fixture;
using Test.Case.Attributes;
namespace Cases namespace Cases
{ {
[TestCaseOrderer("XUnit.Case.Orderers.TestExeOrderer", "Cases.ExeOrder")]
[Collection("Database collection")]
public class NormalTableStmtCases public class NormalTableStmtCases
{ {
DatabaseFixture database;
public NormalTableStmtCases(DatabaseFixture fixture)
{
this.database = fixture;
}
/// <author>xiaolei</author> /// <author>xiaolei</author>
/// <Name>NormalTableStmtCases.TestBindSingleLineCN</Name> /// <Name>NormalTableStmtCases.TestBindSingleLineCN</Name>
/// <describe>Test stmt insert single line of chinese character into normal table by column after column </describe> /// <describe>Test stmt insert single line of chinese character into normal table by column after column </describe>
/// <filename>StmtNormalTable.cs</filename> /// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindSingleLineCN()")] [Fact(DisplayName = "NormalTableStmtCases.TestBindSingleLineCN()"),TestExeOrder(2),Trait("Category", "bindParamCN")]
public void TestBindSingleLineCN() public void TestBindSingleLineCN()
{ {
string tableName = "ntb_stmt_cases_test_bind_single_line_cn"; string tableName = "ntb_stmt_cases_test_bind_single_line_cn";
...@@ -42,7 +53,7 @@ namespace Cases ...@@ -42,7 +53,7 @@ namespace Cases
List<string> expectResData = DataSource.GetNTableCNRowData(); List<string> expectResData = DataSource.GetNTableCNRowData();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb); List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
UtilsTools.ExecuteUpdate(conn, dropSql); UtilsTools.ExecuteUpdate(conn, dropSql);
UtilsTools.ExecuteUpdate(conn, createTb); UtilsTools.ExecuteUpdate(conn, createTb);
...@@ -80,7 +91,7 @@ namespace Cases ...@@ -80,7 +91,7 @@ namespace Cases
/// <describe>Test stmt insert single line of chinese character into normal table by column after column </describe> /// <describe>Test stmt insert single line of chinese character into normal table by column after column </describe>
/// <filename>StmtNormalTable.cs</filename> /// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindColumnCN()")] [Fact(DisplayName = "NormalTableStmtCases.TestBindColumnCN()"),TestExeOrder(4),Trait("Category", "bindSingleColumnCN")]
public void TestBindColumnCN() public void TestBindColumnCN()
{ {
string tableName = "ntb_stmt_cases_test_bind_column_cn"; string tableName = "ntb_stmt_cases_test_bind_column_cn";
...@@ -107,7 +118,7 @@ namespace Cases ...@@ -107,7 +118,7 @@ namespace Cases
TAOS_MULTI_BIND[] mBind = DataSource.GetMultiBindCNArr(); TAOS_MULTI_BIND[] mBind = DataSource.GetMultiBindCNArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb); List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
UtilsTools.ExecuteUpdate(conn, dropSql); UtilsTools.ExecuteUpdate(conn, dropSql);
UtilsTools.ExecuteUpdate(conn, createTb); UtilsTools.ExecuteUpdate(conn, createTb);
...@@ -162,7 +173,7 @@ namespace Cases ...@@ -162,7 +173,7 @@ namespace Cases
/// <describe>Test stmt insert single line of chinese character into normal table by column after column </describe> /// <describe>Test stmt insert single line of chinese character into normal table by column after column </describe>
/// <filename>StmtNormalTable.cs</filename> /// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindMultiLineCN()")] [Fact(DisplayName = "NormalTableStmtCases.TestBindMultiLineCN()"),TestExeOrder(6),Trait("Category", "bindParamBatchCN")]
public void TestBindMultiLineCN() public void TestBindMultiLineCN()
{ {
string tableName = "ntb_stmt_cases_test_bind_multi_lines_cn"; string tableName = "ntb_stmt_cases_test_bind_multi_lines_cn";
...@@ -189,7 +200,7 @@ namespace Cases ...@@ -189,7 +200,7 @@ namespace Cases
List<string> expectResData = DataSource.GetMultiBindCNRowData(); List<string> expectResData = DataSource.GetMultiBindCNRowData();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb); List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection(); ; IntPtr conn = database.conn; ;
UtilsTools.ExecuteUpdate(conn, dropSql); UtilsTools.ExecuteUpdate(conn, dropSql);
UtilsTools.ExecuteUpdate(conn, createTb); UtilsTools.ExecuteUpdate(conn, createTb);
...@@ -231,7 +242,7 @@ namespace Cases ...@@ -231,7 +242,7 @@ namespace Cases
/// <describe>Test stmt insert single line data into normal table</describe> /// <describe>Test stmt insert single line data into normal table</describe>
/// <filename>StmtNormalTable.cs</filename> /// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindSingleLine")] [Fact(DisplayName = "NormalTableStmtCases.TestBindSingleLine"),TestExeOrder(3),Trait("Category", "BindSingleColumn")]
public void TestBindSingleLine() public void TestBindSingleLine()
{ {
string tableName = "ntb_stmt_cases_test_bind_single_line"; string tableName = "ntb_stmt_cases_test_bind_single_line";
...@@ -259,7 +270,7 @@ namespace Cases ...@@ -259,7 +270,7 @@ namespace Cases
List<string> expectResData = DataSource.GetNTableRowData(); List<string> expectResData = DataSource.GetNTableRowData();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb); List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
UtilsTools.ExecuteQuery(conn, dropSql); UtilsTools.ExecuteQuery(conn, dropSql);
UtilsTools.ExecuteQuery(conn, createTb); UtilsTools.ExecuteQuery(conn, createTb);
...@@ -296,14 +307,14 @@ namespace Cases ...@@ -296,14 +307,14 @@ namespace Cases
} }
/// <author>xiaolei</author> /// <author>xiaolei</author>
/// <Name>NTableMultipleLine.TestBindMultiLine</Name> /// <Name>NormalTableStmtCases.TestBindMultiLine</Name>
/// <describe>Test stmt insert multiple rows of data into normal table</describe> /// <describe>Test stmt insert multiple rows of data into normal table</describe>
/// <filename>StmtNormalTable.cs</filename> /// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindMultiLine()")] [Fact(DisplayName = "NormalTableStmtCases.TestBindMultiLine()"),TestExeOrder(5),Trait("Category", "bindParamBatch")]
public void TestBindMultiLine() public void TestBindMultiLine()
{ {
string tableName = "normal_table_stmt_cases_test_bind_multi_lines"; string tableName = "ntb_stmt_case_test_bind_multi_lines";
String createTb = $"create table if not exists {tableName} " + String createTb = $"create table if not exists {tableName} " +
" (" + " (" +
"ts timestamp," + "ts timestamp," +
...@@ -327,7 +338,7 @@ namespace Cases ...@@ -327,7 +338,7 @@ namespace Cases
TAOS_MULTI_BIND[] mBind = DataSource.GetMultiBindArr(); TAOS_MULTI_BIND[] mBind = DataSource.GetMultiBindArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb); List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
UtilsTools.ExecuteUpdate(conn, dropSql); UtilsTools.ExecuteUpdate(conn, dropSql);
UtilsTools.ExecuteUpdate(conn, createTb); UtilsTools.ExecuteUpdate(conn, createTb);
...@@ -365,14 +376,14 @@ namespace Cases ...@@ -365,14 +376,14 @@ namespace Cases
} }
/// <author>xiaolei</author> /// <author>xiaolei</author>
/// <Name>NormalTableStmtCases.TestBindColumnCn</Name> /// <Name>NormalTableStmtCases.TestBindColumn</Name>
/// <describe>Test stmt insert multiple rows of data into normal table by column after column </describe> /// <describe>Test stmt insert multiple rows of data into normal table by column after column </describe>
/// <filename>StmtNormalTable.cs</filename> /// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindColumn()")] [Fact(DisplayName = "NormalTableStmtCases.TestBindColumn()"),TestExeOrder(1),Trait("Category", "bindParam")]
public void TestBindColumn() public void TestBindColumn()
{ {
string tableName = "ntb_stmt_cases_test_bind_column_cn"; string tableName = "ntb_stmt_cases_test_bind_column";
DataSource data = new DataSource(); DataSource data = new DataSource();
String createTb = $"create table if not exists {tableName} " + String createTb = $"create table if not exists {tableName} " +
" (" + " (" +
...@@ -398,7 +409,7 @@ namespace Cases ...@@ -398,7 +409,7 @@ namespace Cases
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb); List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
UtilsTools.ExecuteUpdate(conn, dropSql); UtilsTools.ExecuteUpdate(conn, dropSql);
UtilsTools.ExecuteUpdate(conn, createTb); UtilsTools.ExecuteUpdate(conn, createTb);
......
...@@ -5,17 +5,30 @@ using Test.UtilsTools.DataSource; ...@@ -5,17 +5,30 @@ using Test.UtilsTools.DataSource;
using System.Collections.Generic; using System.Collections.Generic;
using Test.UtilsTools.ResultSet; using Test.UtilsTools.ResultSet;
using Xunit; using Xunit;
using Test.Fixture;
using Test.Case.Attributes;
namespace Cases namespace Cases
{ {
[TestCaseOrderer("XUnit.Case.Orderers.TestExeOrderer", "Cases.ExeOrder")]
[Collection("Database collection")]
public class StableStmtCases public class StableStmtCases
{ {
DatabaseFixture database;
public StableStmtCases(DatabaseFixture fixture)
{
this.database = fixture;
}
/// <author>xiaolei</author> /// <author>xiaolei</author>
/// <Name>StableStmtCases.TestBindSingleLineCN</Name> /// <Name>StableStmtCases.TestBindSingleLineCN</Name>
/// <describe>Test stmt insert single line of chinese character into stable by column after column </describe> /// <describe>Test stmt insert single line of chinese character into stable by column after column </describe>
/// <filename>StmtSTable.cs</filename> /// <filename>StmtSTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "StableStmtCases.TestBindSingleLineCN()")] [Fact(DisplayName = "StableStmtCases.TestBindSingleLineCN()"),TestExeOrder(2),Trait("Category", "BindParamCN")]
public void TestBindSingleLineCN() public void TestBindSingleLineCN()
{ {
string tableName = "stb_stmt_cases_test_bind_single_line_cn"; string tableName = "stb_stmt_cases_test_bind_single_line_cn";
...@@ -57,7 +70,7 @@ namespace Cases ...@@ -57,7 +70,7 @@ namespace Cases
TAOS_BIND[] tags = DataSource.GetCNTags(); TAOS_BIND[] tags = DataSource.GetCNTags();
TAOS_BIND[] binds = DataSource.GetNTableCNRow(); TAOS_BIND[] binds = DataSource.GetNTableCNRow();
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
UtilsTools.ExecuteUpdate(conn, dropSql); UtilsTools.ExecuteUpdate(conn, dropSql);
UtilsTools.ExecuteUpdate(conn, createSql); UtilsTools.ExecuteUpdate(conn, createSql);
...@@ -99,7 +112,7 @@ namespace Cases ...@@ -99,7 +112,7 @@ namespace Cases
/// <describe>Test stmt insert single line of chinese character into stable by column after column </describe> /// <describe>Test stmt insert single line of chinese character into stable by column after column </describe>
/// <filename>StmtSTable.cs</filename> /// <filename>StmtSTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "StableStmtCases.TestBindColumnCN()")] [Fact(DisplayName = "StableStmtCases.TestBindColumnCN()"),TestExeOrder(4),Trait("Category", "BindParamColumnCN")]
public void TestBindColumnCN() public void TestBindColumnCN()
{ {
string tableName = "stb_stmt_cases_test_bindcolumn_cn"; string tableName = "stb_stmt_cases_test_bindcolumn_cn";
...@@ -141,7 +154,7 @@ namespace Cases ...@@ -141,7 +154,7 @@ namespace Cases
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql); List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<String> expectResData = DataSource.GetMultiBindStableCNRowData(); List<String> expectResData = DataSource.GetMultiBindStableCNRowData();
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
UtilsTools.ExecuteUpdate(conn, dropSql); UtilsTools.ExecuteUpdate(conn, dropSql);
UtilsTools.ExecuteUpdate(conn, createSql); UtilsTools.ExecuteUpdate(conn, createSql);
...@@ -199,7 +212,7 @@ namespace Cases ...@@ -199,7 +212,7 @@ namespace Cases
/// <describe>Test stmt insert single line of chinese character into stable by column after column </describe> /// <describe>Test stmt insert single line of chinese character into stable by column after column </describe>
/// <filename>StmtSTable.cs</filename> /// <filename>StmtSTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "StableStmtCases.TestBindMultiLineCN()")] [Fact(DisplayName = "StableStmtCases.TestBindMultiLineCN()"),TestExeOrder(6),Trait("Category", "BindParamBatchCN")]
public void TestBindMultiLineCN() public void TestBindMultiLineCN()
{ {
string tableName = "stb_stmt_cases_test_bind_multi_line_cn"; string tableName = "stb_stmt_cases_test_bind_multi_line_cn";
...@@ -241,7 +254,7 @@ namespace Cases ...@@ -241,7 +254,7 @@ namespace Cases
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql); List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<String> expectResData = DataSource.GetMultiBindStableCNRowData(); List<String> expectResData = DataSource.GetMultiBindStableCNRowData();
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
UtilsTools.ExecuteUpdate(conn, dropSql); UtilsTools.ExecuteUpdate(conn, dropSql);
UtilsTools.ExecuteUpdate(conn, createSql); UtilsTools.ExecuteUpdate(conn, createSql);
...@@ -282,11 +295,11 @@ namespace Cases ...@@ -282,11 +295,11 @@ namespace Cases
/// <describe>Test stmt insert single line into stable by column after column </describe> /// <describe>Test stmt insert single line into stable by column after column </describe>
/// <filename>StmtSTable.cs</filename> /// <filename>StmtSTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "StableStmtCases.TestBindMultiLine()")] [Fact(DisplayName = "StableStmtCases.TestBindMultiLine()"),TestExeOrder(5),Trait("Category", "BindParamBatch")]
public void TestBindMultiLine() public void TestBindMultiLine()
{ {
string tableName = "stb_stmt_cases_test_bind_multi_line"; string tableName = "stb_stmt_cases_test_bind_multi_line";
string createSql = $"create stable if not exists {tableName} " + string createSql = $"create stable if not exists {tableName} " +
"(ts timestamp," + "(ts timestamp," +
"b bool," + "b bool," +
"v1 tinyint," + "v1 tinyint," +
...@@ -324,7 +337,7 @@ namespace Cases ...@@ -324,7 +337,7 @@ namespace Cases
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql); List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<String> expectResData = DataSource.GetMultiBindStableRowData(); List<String> expectResData = DataSource.GetMultiBindStableRowData();
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
UtilsTools.ExecuteUpdate(conn, dropSql); UtilsTools.ExecuteUpdate(conn, dropSql);
UtilsTools.ExecuteUpdate(conn, createSql); UtilsTools.ExecuteUpdate(conn, createSql);
...@@ -370,7 +383,7 @@ namespace Cases ...@@ -370,7 +383,7 @@ namespace Cases
/// <describe>Test stmt insert single line of chinese character into stable by column after column </describe> /// <describe>Test stmt insert single line of chinese character into stable by column after column </describe>
/// <filename>StmtSTable.cs</filename> /// <filename>StmtSTable.cs</filename>
/// <result>pass or failed </result> /// <result>pass or failed </result>
[Fact(DisplayName = "StableStmtCases.TestBindColumn()")] [Fact(DisplayName = "StableStmtCases.TestBindColumn()"),TestExeOrder(3),Trait("Category", "BindParamColumn")]
public void TestBindColumn() public void TestBindColumn()
{ {
string tableName = "stb_stmt_cases_test_bindcolumn"; string tableName = "stb_stmt_cases_test_bindcolumn";
...@@ -412,7 +425,7 @@ namespace Cases ...@@ -412,7 +425,7 @@ namespace Cases
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql); List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<String> expectResData = DataSource.GetMultiBindStableRowData(); List<String> expectResData = DataSource.GetMultiBindStableRowData();
IntPtr conn = UtilsTools.TDConnection(); IntPtr conn = database.conn;
UtilsTools.ExecuteUpdate(conn, dropSql); UtilsTools.ExecuteUpdate(conn, dropSql);
UtilsTools.ExecuteUpdate(conn, createSql); UtilsTools.ExecuteUpdate(conn, createSql);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册