Skip to content

Commit

Permalink
fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ichn-hu committed May 19, 2021
1 parent a944bf1 commit 631121e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
3 changes: 1 addition & 2 deletions executor/memtable_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ func fetchClusterConfig(sctx sessionctx.Context, nodeTypes, nodeAddrs set.String
case "tikv", "tidb":
url = fmt.Sprintf("%s://%s/config", util.InternalHTTPSchema(), statusAddr)
case "tiflash":
fmt.Println("tiflash !")
// TODO: tiflash does not yet support reading config, handle correspondingly once it supports.
// TODO: support show tiflash config once tiflash supports it
return
default:
ch <- result{err: errors.Errorf("unknown node type: %s(%s)", typ, address)}
Expand Down
2 changes: 1 addition & 1 deletion executor/memtable_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (s *testMemTableReaderSuite) TestTiDBClusterConfig(c *C) {

// mock servers
servers := []string{}
for _, typ := range []string{"tidb", "tikv", "pd"} {
for _, typ := range []string{"tidb", "tikv", "tiflash", "pd"} {
for _, server := range testServers {
servers = append(servers, strings.Join([]string{typ, server.address, server.address}, ","))
}
Expand Down
11 changes: 0 additions & 11 deletions executor/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1112,17 +1112,6 @@ func (s *testSuite5) TestShowClusterConfig(c *C) {
tk := testkit.NewTestKit(c, s.store)
tk.MustExec("use test")

instances := []string{
strings.Join([]string{"tiflash", "127.0.0.0:1234", "127.0.0.0:1234", "mock-version,mock-githash,0"}, ","),
}

fpExpr := `return("` + strings.Join(instances, ";") + `")`
fpName := "github.com/pingcap/tidb/executor/mockClusterConfigServerInfo"
c.Assert(failpoint.Enable(fpName, fpExpr), IsNil)
defer func() { c.Assert(failpoint.Disable(fpName), IsNil) }()
tk.MustExec("show config")
c.Assert(tk.Se.GetSessionVars().SysWarningCount, Equals, 0)

var confItems [][]types.Datum
var confErr error
var confFunc executor.TestShowClusterConfigFunc = func() ([][]types.Datum, error) {
Expand Down

0 comments on commit 631121e

Please sign in to comment.