Skip to content

Commit

Permalink
session: cleanup check_dev_2 scaffolding (#34768)
Browse files Browse the repository at this point in the history
ref #26864
  • Loading branch information
tisonkun authored May 18, 2022
1 parent 2faac4f commit d834649
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 55 deletions.
5 changes: 0 additions & 5 deletions session/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ import (

var testDataMap = make(testdata.BookKeeper, 1)

var WithTiKV = flag.Bool("with-tikv", false, "workaroundGoCheckFlags: with-tikv")
var _ = flag.String("pd-addrs", "", "workaroundGoCheckFlags: pd-addrs")
var _ = flag.String("check.exclude", "", "workaroundGoCheckFlags: check.exclude")
var _ = flag.String("check.f", "", "workaroundGoCheckFlags: check.f")

func TestMain(m *testing.M) {
testmain.ShortCircuitForBench(m)

Expand Down
41 changes: 0 additions & 41 deletions session/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ import (
"github.com/tikv/client-go/v2/testutils"
)

func skipIfWithRealTiKV(t *testing.T) {
if *session.WithTiKV {
t.Skip("Schema tests has nothing to do with real tikv scenario")
}
}

func createMockStoreForSchemaTest(t *testing.T, opts ...mockstore.MockTiKVStoreOption) (kv.Storage, func()) {
store, err := mockstore.NewMockStore(opts...)
require.NoError(t, err)
Expand All @@ -60,8 +54,6 @@ func createMockStoreForSchemaTest(t *testing.T, opts ...mockstore.MockTiKVStoreO
}

func TestPrepareStmtCommitWhenSchemaChanged(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand Down Expand Up @@ -90,8 +82,6 @@ func TestPrepareStmtCommitWhenSchemaChanged(t *testing.T) {
}

func TestCommitWhenSchemaChanged(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand All @@ -116,8 +106,6 @@ func TestCommitWhenSchemaChanged(t *testing.T) {
}

func TestRetrySchemaChangeForEmptyChange(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand Down Expand Up @@ -149,8 +137,6 @@ func TestRetrySchemaChangeForEmptyChange(t *testing.T) {
}

func TestRetrySchemaChange(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand Down Expand Up @@ -193,8 +179,6 @@ func TestRetrySchemaChange(t *testing.T) {
}

func TestRetryMissingUnionScan(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand All @@ -220,8 +204,6 @@ func TestRetryMissingUnionScan(t *testing.T) {
}

func TestTableReaderChunk(t *testing.T) {
skipIfWithRealTiKV(t)

// Since normally a single region mock tikv only returns one partial result we need to manually split the
// table to test multiple chunks.
var cluster testutils.Cluster
Expand Down Expand Up @@ -273,8 +255,6 @@ func TestTableReaderChunk(t *testing.T) {
}

func TestInsertExecChunk(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand Down Expand Up @@ -311,8 +291,6 @@ func TestInsertExecChunk(t *testing.T) {
}

func TestUpdateExecChunk(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand Down Expand Up @@ -351,8 +329,6 @@ func TestUpdateExecChunk(t *testing.T) {
}

func TestDeleteExecChunk(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand Down Expand Up @@ -384,8 +360,6 @@ func TestDeleteExecChunk(t *testing.T) {
}

func TestDeleteMultiTableExecChunk(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand Down Expand Up @@ -439,8 +413,6 @@ func TestDeleteMultiTableExecChunk(t *testing.T) {
}

func TestIndexLookUpReaderChunk(t *testing.T) {
skipIfWithRealTiKV(t)

// Since normally a single region mock tikv only returns one partial result we need to manually split the
// table to test multiple chunks.
var cluster testutils.Cluster
Expand Down Expand Up @@ -504,8 +476,6 @@ func TestIndexLookUpReaderChunk(t *testing.T) {
}

func TestDisableTxnAutoRetry(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand Down Expand Up @@ -601,8 +571,6 @@ func TestDisableTxnAutoRetry(t *testing.T) {
}

func TestTxnSize(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand All @@ -620,8 +588,6 @@ func TestTxnSize(t *testing.T) {
}

func TestLoadSchemaFailed(t *testing.T) {
skipIfWithRealTiKV(t)

originalRetryTime := domain.SchemaOutOfDateRetryTimes.Load()
originalRetryInterval := domain.SchemaOutOfDateRetryInterval.Load()
domain.SchemaOutOfDateRetryTimes.Store(3)
Expand Down Expand Up @@ -679,8 +645,6 @@ func TestLoadSchemaFailed(t *testing.T) {
}

func TestValidationRecursion(t *testing.T) {
skipIfWithRealTiKV(t)

// We have to expect that validation functions will call GlobalVarsAccessor.GetGlobalSysVar().
// This tests for a regression where GetGlobalSysVar() can not safely call the validation
// function because it might cause infinite recursion.
Expand All @@ -702,8 +666,6 @@ func TestValidationRecursion(t *testing.T) {
}

func TestSchemaCheckerSQL(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand Down Expand Up @@ -778,8 +740,6 @@ func TestSchemaCheckerSQL(t *testing.T) {
}

func TestSchemaCheckerTempTable(t *testing.T) {
skipIfWithRealTiKV(t)

store, clean := createMockStoreForSchemaTest(t)
defer clean()

Expand Down Expand Up @@ -882,7 +842,6 @@ func TestSchemaCheckerTempTable(t *testing.T) {
}

func TestGlobalAndLocalTxn(t *testing.T) {
skipIfWithRealTiKV(t)
// Because the PD config of check_dev_2 test is not compatible with local/global txn yet,
// so we will skip this test for now.
store, clean := testkit.CreateMockStore(t)
Expand Down
3 changes: 0 additions & 3 deletions tests/realtikvtest/brietest/backup_restore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// This file contains tests about backup restore (br) which need running with real TiKV.
// Only tests under /session will be run with real TiKV, so we put them here instead of /br.

package brietest

import (
Expand Down
3 changes: 0 additions & 3 deletions tests/realtikvtest/brietest/binlog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// This file contains tests about binlog which need running with real TiKV.
// Only tests under /session will be run with real TiKV, so we put them here.

package brietest

import (
Expand Down
3 changes: 0 additions & 3 deletions tests/realtikvtest/statisticstest/statistics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// This file contains tests about statistics which need running with real TiKV.
// Only tests under /session will be run with real TiKV, so we put them here instead of /statistics.

package statisticstest

import (
Expand Down

0 comments on commit d834649

Please sign in to comment.