Skip to content

Commit

Permalink
fix possible nil before casting (#5017)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesxsh committed Dec 1, 2021
1 parent c2bccd0 commit 46935b9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xds/internal/balancer/clustermanager/clustermanager_test.go
Expand Up @@ -559,9 +559,12 @@ func TestClusterManagerForwardsBalancerBuildOptions(t *testing.T) {
}
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
defer cancel()
if v, err := ccsCh.Receive(ctx); err != nil {
err2 := v.(error)
t.Fatal(err2)
v, err := ccsCh.Receive(ctx)
if err != nil {
t.Fatalf("timed out waiting for UpdateClientConnState result: %v", err)
}
if v != nil {
t.Fatal(v)
}
}

Expand Down

0 comments on commit 46935b9

Please sign in to comment.