Skip to content

Commit db2abf1

Browse files
committed
combine into a single test
Signed-off-by: Yang Keao <[email protected]>
1 parent a8019fb commit db2abf1

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

pkg/server/internal/testserverclient/server_client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2728,7 +2728,7 @@ func (cli *TestServerClient) RunTestConnectionCount(t *testing.T) {
27282728
})
27292729
}
27302730

2731-
func (cli *TestServerClient) RunTestTypeOfSendLongData(t *testing.T) {
2731+
func (cli *TestServerClient) RunTestTypeAndCharsetOfSendLongData(t *testing.T) {
27322732
cli.RunTests(t, func(config *mysql.Config) {
27332733
config.MaxAllowedPacket = 1024
27342734
}, func(dbt *testkit.DBTestKit) {
@@ -2753,9 +2753,7 @@ func (cli *TestServerClient) RunTestTypeOfSendLongData(t *testing.T) {
27532753
require.Equal(t, str, j)
27542754
}
27552755
})
2756-
}
27572756

2758-
func (cli *TestServerClient) RunTestCharsetOfSendLongData(t *testing.T) {
27592757
str := strings.Repeat("你好", 1024)
27602758
enc := simplifiedchinese.GBK.NewEncoder()
27612759
gbkStr, err := enc.String(str)
@@ -2769,6 +2767,8 @@ func (cli *TestServerClient) RunTestCharsetOfSendLongData(t *testing.T) {
27692767

27702768
conn, err := dbt.GetDB().Conn(ctx)
27712769
require.NoError(t, err)
2770+
_, err = conn.ExecContext(ctx, "drop table t")
2771+
require.NoError(t, err)
27722772
_, err = conn.ExecContext(ctx, "CREATE TABLE t (t TEXT);")
27732773
require.NoError(t, err)
27742774

pkg/server/tests/commontest/tidb_test.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3083,12 +3083,7 @@ func TestConnectionCount(t *testing.T) {
30833083
ts.RunTestConnectionCount(t)
30843084
}
30853085

3086-
func TestTypeOfSendLongData(t *testing.T) {
3086+
func TestTypeAndCharsetOfSendLongData(t *testing.T) {
30873087
ts := servertestkit.CreateTidbTestSuite(t)
3088-
ts.RunTestTypeOfSendLongData(t)
3089-
}
3090-
3091-
func TestCharsetOfSendLongData(t *testing.T) {
3092-
ts := servertestkit.CreateTidbTestSuite(t)
3093-
ts.RunTestCharsetOfSendLongData(t)
3088+
ts.RunTestTypeAndCharsetOfSendLongData(t)
30943089
}

0 commit comments

Comments
 (0)