correct onerror behavior
Signed-off-by: spacexnice <yaoyao.xyy@alibaba-inc.com>
This commit is contained in:
parent
22cf89c02b
commit
68243306fb
1 changed files with 4 additions and 5 deletions
|
@ -102,25 +102,24 @@ func testAuthChallengeConcurrent(t *testing.T, host string) {
|
||||||
var s sync.WaitGroup
|
var s sync.WaitGroup
|
||||||
s.Add(2)
|
s.Add(2)
|
||||||
go func() {
|
go func() {
|
||||||
|
defer s.Done()
|
||||||
for i := 0; i < 200; i++ {
|
for i := 0; i < 200; i++ {
|
||||||
err = scm.AddResponse(resp)
|
err = scm.AddResponse(resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s.Done()
|
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
|
defer s.Done()
|
||||||
lowered := *url
|
lowered := *url
|
||||||
lowered.Host = strings.ToLower(lowered.Host)
|
lowered.Host = strings.ToLower(lowered.Host)
|
||||||
for k := 0; k < 200; k++ {
|
for k := 0; k < 200; k++ {
|
||||||
_, err := scm.GetChallenges(lowered)
|
_, err := scm.GetChallenges(lowered)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s.Done()
|
|
||||||
}()
|
}()
|
||||||
s.Wait()
|
s.Wait()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue