From b6ad0b3284a825e4239760153f2ce4d19197057a Mon Sep 17 00:00:00 2001
From: sunty <1172534965@qq.com>
Date: 星期四, 16 四月 2020 11:46:55 +0800
Subject: [PATCH] uasa unit test

---
 controllers/swfsControllers.go |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/controllers/swfsControllers.go b/controllers/swfsControllers.go
index cd4c6f0..1994c46 100644
--- a/controllers/swfsControllers.go
+++ b/controllers/swfsControllers.go
@@ -157,8 +157,11 @@
 		startupItem = string(body)
 	}
 	tick := time.Tick(1 * time.Second)
+	fmt.Println("鍑嗗寮�濮嬮獙璇佽妭鐐规湇鍔�")
 	for countdown := timeOut; countdown > 0; countdown-- {
+		fmt.Println("绗竴娆¢獙璇�")
 		result := Verification(startupItem, ip)
+		fmt.Println("绗竴娆¢獙璇乺esult缁撴灉锛�", result)
 		if result == true {
 			break
 		}
@@ -208,11 +211,15 @@
 	masterIp := make([]string, 0)
 	timeOut, _ := strconv.Atoi(config.Server.TimeOut)
 	var waitGroup sync.WaitGroup
+	fmt.Println("褰撳墠骞惰搴oreThread锛�", coreThread)
 	for i, ip := range peersIp {
 		fmt.Println("閲嶅惎绗竴缁勬湇鍔�" + ip)
 		if (i+1)%coreThread == 0 {
 			masterIp = append(masterIp, strings.Split(ip, ":")[0])
+			fmt.Println("鍔犲叆绗竴缁勫苟寮�濮嬮獙璇佺涓�缁� masterIp: ", masterIp)
 			for i := 0; i < len(masterIp); i++ {
+				fmt.Println("len masterIp: ", len(masterIp))
+				fmt.Println("绗�" + strconv.Itoa(i) + "涓嚎绋�")
 				go Restart(masterIp[i], timeOut)
 				waitGroup.Add(1) //姣忓垱寤轰竴涓猤oroutine锛屽氨鎶婁换鍔¢槦鍒椾腑浠诲姟鐨勬暟閲�+1
 			}
@@ -231,7 +238,6 @@
 				break
 			}
 		}
-		continue
 	}
 }
 

--
Gitblit v1.8.0