Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: remove localstore dependency. #4965

Merged
merged 10 commits into from
Nov 2, 2017
Merged

*: remove localstore dependency. #4965

merged 10 commits into from
Nov 2, 2017

Conversation

hanfei1991
Copy link
Member

No description provided.

@hanfei1991 hanfei1991 changed the title *: use mocktikv for some tests *: remove localstore dependency. Oct 31, 2017
@zz-jason
Copy link
Member

/run-all-test

@iamxy
Copy link
Member

iamxy commented Nov 1, 2017

/run-all-tests

@coocood
Copy link
Member

coocood commented Nov 1, 2017

leveldb is used in tidb-test

}

// End implements autoid.Allocator End interface.
func (alloc *allocator) End() int64 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need End if it the same as Base?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My fault, it should return end

@hanfei1991
Copy link
Member Author

/run-all-tests

@hanfei1991
Copy link
Member Author

/run-all-test tidb-test=pr/388

@hanfei1991
Copy link
Member Author

/run-all-test tidb-test=pr/388

@hanfei1991
Copy link
Member Author

@coocood PTAL

@@ -44,7 +44,6 @@ func (s *testBootstrapSuite) TestBootstrap(c *C) {
defer testleak.AfterTest(c)()
store, dom := newStoreWithBootstrap(c, s.dbName)
defer dom.Close()
defer store.Close()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because store has been closed in line 97

@@ -349,11 +349,19 @@ func (ps *perfSchema) initialize() {
ps.buildTables()
}

func (ps *perfSchema) GetDBMeta() *model.DBInfo {
// GetDBMeta returns the db info.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/db/DB

store, err := tidb.NewStore("memory:///tmp/tidb")
store, err := tikv.NewMockTikvStore()
tidb.SetStatsLease(0)
tidb.SetSchemaLease(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this code can be removed. Because we use mock syncer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@hanfei1991
Copy link
Member Author

@zimulala @zz-jason PTAL

@coocood
Copy link
Member

coocood commented Nov 1, 2017

LGTM

@hanfei1991 hanfei1991 added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 1, 2017
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 2, 2017
@hanfei1991 hanfei1991 merged commit ce5a3d6 into pingcap:master Nov 2, 2017
@hanfei1991 hanfei1991 deleted the test branch November 2, 2017 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants