adjust for loop
Signed-off-by: spacexnice <yaoyao.xyy@alibaba-inc.com>
This commit is contained in:
parent
44b8157572
commit
ca2b78dc0a
@ -103,35 +103,24 @@ func testAuthChallengeConcurrent(t *testing.T, host string) {
|
||||
var s sync.WaitGroup
|
||||
s.Add(2)
|
||||
go func() {
|
||||
i := 200
|
||||
for {
|
||||
//time.Sleep(500 * time.Millisecond)
|
||||
|
||||
for i:=0 ; i<200; i++ {
|
||||
err = scm.AddResponse(resp)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
i = i -1
|
||||
if i < 0{
|
||||
break
|
||||
}
|
||||
}
|
||||
s.Done()
|
||||
}()
|
||||
go func() {
|
||||
lowered := *url
|
||||
lowered.Host = strings.ToLower(lowered.Host)
|
||||
k:= 200
|
||||
for {
|
||||
for k := 0; k < 200 ; k++ {
|
||||
_, err := scm.GetChallenges(lowered)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
k = k -1
|
||||
if k < 0{
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
s.Done()
|
||||
}()
|
||||
s.Wait()
|
||||
|
Loading…
Reference in New Issue
Block a user