From 68243306fb578a2e9d6ad3463a267eab02113fd8 Mon Sep 17 00:00:00 2001 From: spacexnice Date: Fri, 26 Aug 2016 09:41:54 +0800 Subject: [PATCH] correct onerror behavior Signed-off-by: spacexnice --- registry/client/auth/authchallenge_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/registry/client/auth/authchallenge_test.go b/registry/client/auth/authchallenge_test.go index 862b717b..e767ed74 100644 --- a/registry/client/auth/authchallenge_test.go +++ b/registry/client/auth/authchallenge_test.go @@ -102,25 +102,24 @@ func testAuthChallengeConcurrent(t *testing.T, host string) { var s sync.WaitGroup s.Add(2) go func() { - + defer s.Done() for i := 0; i < 200; i++ { err = scm.AddResponse(resp) if err != nil { - t.Fatal(err) + t.Error(err) } } - s.Done() }() go func() { + defer s.Done() lowered := *url lowered.Host = strings.ToLower(lowered.Host) for k := 0; k < 200; k++ { _, err := scm.GetChallenges(lowered) if err != nil { - t.Fatal(err) + t.Error(err) } } - s.Done() }() s.Wait() }