Skip to content

Commit

Permalink
fix dump
Browse files Browse the repository at this point in the history
Signed-off-by: wjhuang2016 <[email protected]>
  • Loading branch information
wjhuang2016 committed Apr 1, 2024
1 parent 39a3941 commit 6f6587a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dump/dumping.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import (
"strings"
)

func DumpToFile(dbName string, tblName []string, fileName string) error {
func DumpToFile(dbName string, tblName []string, fileName string, host string) error {
conf := export.DefaultConfig()
conf.Host = strings.Split(host, ":")[0]
conf.Port = 4000

ns := make([]string, len(tblName))
Expand Down
2 changes: 1 addition & 1 deletion framework/mainloop.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ func (c *testCase) execute(ctx context.Context) error {
return err
}
pwd := os.Getenv("PWD")
err = dump.DumpToFile("test", tblNames, fmt.Sprintf("local://%s/bug-%s-%d", pwd, time.Now().Format("2006-01-02-15-04-05"), num))
err = dump.DumpToFile("test", tblNames, fmt.Sprintf("local://%s/bug-%s-%d", pwd, time.Now().Format("2006-01-02-15-04-05"), num), c.cfg.dbAddr)
if err != nil {
return err
}
Expand Down

0 comments on commit 6f6587a

Please sign in to comment.