From 53e5f323fa73255e820606f7d72504218dec6c4d Mon Sep 17 00:00:00 2001 From: wjhuang2016 Date: Sat, 30 Mar 2024 00:58:28 +0800 Subject: [PATCH] fix addr Signed-off-by: wjhuang2016 --- framework/mainloop.go | 5 ++++- framework/run.go | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/framework/mainloop.go b/framework/mainloop.go index b52c4b0..8559392 100644 --- a/framework/mainloop.go +++ b/framework/mainloop.go @@ -55,6 +55,7 @@ type CaseConfig struct { MySQLCompatible bool TablesToCreate int TestTp DDLTestType + dbAddr string } var globalBugSeqNum int64 = 0 @@ -564,7 +565,9 @@ func (c *testCase) execute(ctx context.Context) error { tableMetas := make([]*model.TableInfo, 0) for i := 0; i < len(state.Tables); i++ { - path := fmt.Sprintf("127.0.0.1:10080/schema/%s/%s", c.initDB, state.Tables[i].Name) + addr := c.cfg.dbAddr + stateAddr := strings.Replace(addr, "4000", "10080", -1) + path := fmt.Sprintf("%d/schema/%s/%s", stateAddr, c.initDB, state.Tables[i].Name) rawMeta, err := exec.Command("curl", path).Output() if err != nil { log.Infof("curl error %s", err.Error()) diff --git a/framework/run.go b/framework/run.go index 4b67b28..23a1cf9 100644 --- a/framework/run.go +++ b/framework/run.go @@ -78,6 +78,7 @@ func Run(dbAddr string, dbName string, concurrency int, tablesToCreate int, mysq TablesToCreate: tablesToCreate, MySQLCompatible: mysqlCompatible, TestTp: testTp, + dbAddr: dbAddr, } ddl := NewDDLCase(&cfg) if RCIsolation {