@@ -29,6 +29,7 @@ import (
29
29
"github.com/pingcap/tidb/pkg/parser/ast"
30
30
"github.com/pingcap/tidb/pkg/testkit"
31
31
"github.com/pingcap/tidb/pkg/testkit/external"
32
+ "github.com/pingcap/tidb/pkg/testkit/testfailpoint"
32
33
"github.com/pingcap/tidb/pkg/util/dbterror/exeerrors"
33
34
"github.com/stretchr/testify/require"
34
35
)
@@ -752,8 +753,7 @@ func TestView(t *testing.T) {
752
753
}
753
754
754
755
func TestDirectReadingwithIndexJoin (t * testing.T ) {
755
- failpoint .Enable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
756
- defer failpoint .Disable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" )
756
+ testfailpoint .Enable (t , "github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
757
757
store := testkit .CreateMockStore (t )
758
758
759
759
tk := testkit .NewTestKit (t , store )
@@ -866,8 +866,7 @@ func TestDirectReadingwithIndexJoin(t *testing.T) {
866
866
}
867
867
868
868
func TestDynamicPruningUnderIndexJoin (t * testing.T ) {
869
- failpoint .Enable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
870
- defer failpoint .Disable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" )
869
+ testfailpoint .Enable (t , "github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
871
870
store := testkit .CreateMockStore (t )
872
871
873
872
tk := testkit .NewTestKit (t , store )
@@ -1028,8 +1027,7 @@ func TestBatchGetforRangeandListPartitionTable(t *testing.T) {
1028
1027
}
1029
1028
1030
1029
func TestPartitionTableWithDifferentJoin (t * testing.T ) {
1031
- failpoint .Enable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
1032
- defer failpoint .Disable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" )
1030
+ testfailpoint .Enable (t , "github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
1033
1031
store := testkit .CreateMockStore (t )
1034
1032
1035
1033
tk := testkit .NewTestKit (t , store )
@@ -1263,8 +1261,7 @@ func TestPartitionTableWithDifferentJoin(t *testing.T) {
1263
1261
}
1264
1262
1265
1263
func TestMPPQueryExplainInfo (t * testing.T ) {
1266
- failpoint .Enable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
1267
- defer failpoint .Disable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" )
1264
+ testfailpoint .Enable (t , "github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
1268
1265
store := testkit .CreateMockStore (t )
1269
1266
1270
1267
tk := testkit .NewTestKit (t , store )
@@ -1469,8 +1466,7 @@ func TestSubqueries(t *testing.T) {
1469
1466
}
1470
1467
1471
1468
func TestSplitRegion (t * testing.T ) {
1472
- failpoint .Enable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
1473
- defer failpoint .Disable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" )
1469
+ testfailpoint .Enable (t , "github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
1474
1470
store := testkit .CreateMockStore (t )
1475
1471
1476
1472
tk := testkit .NewTestKit (t , store )
@@ -1507,8 +1503,7 @@ func TestSplitRegion(t *testing.T) {
1507
1503
}
1508
1504
1509
1505
func TestParallelApply (t * testing.T ) {
1510
- failpoint .Enable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
1511
- defer failpoint .Disable ("github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" )
1506
+ testfailpoint .Enable (t , "github.com/pingcap/tidb/pkg/planner/core/forceDynamicPrune" , `return(true)` )
1512
1507
1513
1508
store := testkit .CreateMockStore (t )
1514
1509
0 commit comments