Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: lzmhhh123 <lzmhhh123@gmail.com>
  • Loading branch information
lzmhhh123 committed Mar 8, 2021
1 parent 8cb08a2 commit 38c9c81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion executor/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6954,7 +6954,7 @@ func (s *testCoprCache) TestIntegrationCopCache(c *C) {

// Test for cop cache disabled.
cfg := config.NewConfig()
cfg.TiKVClient.CoprCache.Enable = false
cfg.TiKVClient.CoprCache.CapacityMB = 0
config.StoreGlobalConfig(cfg)
rows = tk.MustQuery("explain analyze select * from t where t.a < 10").Rows()
c.Assert(rows[0][2], Equals, "9")
Expand Down
8 changes: 7 additions & 1 deletion server/http_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,13 @@ func (ts *HTTPHandlerTestSuite) TestGetSettings(c *C) {
var settings *config.Config
err = decoder.Decode(&settings)
c.Assert(err, IsNil)
c.Assert(settings, DeepEquals, config.GetGlobalConfig())
var configBytes []byte
configBytes, err = json.Marshal(config.GetGlobalConfig())
c.Assert(err, IsNil)
var settingBytes []byte
settingBytes, err = json.Marshal(settings)
c.Assert(err, IsNil)
c.Assert(settingBytes, DeepEquals, configBytes)
}

func (ts *HTTPHandlerTestSuite) TestGetSchema(c *C) {
Expand Down

0 comments on commit 38c9c81

Please sign in to comment.