From 5bea64255fcd9dc7fce550999aec629f1373961d Mon Sep 17 00:00:00 2001 From: luancheng Date: Wed, 23 Dec 2020 15:37:57 +0800 Subject: [PATCH] address comment --- lightning/restore/tidb.go | 1 - lightning/restore/tidb_test.go | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning/restore/tidb.go b/lightning/restore/tidb.go index 2d8b92468..e67e1ba86 100644 --- a/lightning/restore/tidb.go +++ b/lightning/restore/tidb.go @@ -175,7 +175,6 @@ loopCreate: ) failpoint.Inject("sqlCreateStmts", func() { err = errors.Errorf("create %s failed", tbl) - failpoint.Return() }) if err != nil { break loopCreate diff --git a/lightning/restore/tidb_test.go b/lightning/restore/tidb_test.go index d22a28419..efd4cc0af 100644 --- a/lightning/restore/tidb_test.go +++ b/lightning/restore/tidb_test.go @@ -240,7 +240,8 @@ func (s *tidbSuite) TestInitSchemaErrorLost(c *C) { "t2": "create table t2 (a int primary key, b varchar(200));", }) failpoint.Disable("github.com/pingcap/tidb-lightning/lightning/restore/sqlCreateStmts") - c.Assert(err, ErrorMatches, "create failed") + // cannot predict which table will failed since map is unorder. + c.Assert(err, ErrorMatches, "create (.*) failed") } func (s *tidbSuite) TestInitSchemaUnsupportedSchemaError(c *C) {