Codebase list golang-github-go-kit-kit / 22a2d43
fix context in Send() (#857) He Liu authored 5 years ago Peter Bourgon committed 5 years ago
2 changed file(s) with 7 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
165165 Namespace: aws.String(cw.namespace),
166166 MetricData: batch,
167167 })
168 _, err := req.Send()
168 _, err := req.Send(context.TODO())
169169 return err
170170 })
171171 }
00 package cloudwatch2
11
22 import (
3 "net/http"
34 "strings"
45 "testing"
56
8687 // going across the wire, you just create a dumb aws.Request with either
8788 // aws.Request.Data defined (for succes) or with aws.Request.Error
8889 // to simulate an Error.
89 Request: &aws.Request{Data: &cloudwatch.PutMetricDataOutput{}},
90 Input: in,
90 Request: &aws.Request{
91 HTTPRequest: &http.Request{Method: "PUT"},
92 Data: &cloudwatch.PutMetricDataOutput{},
93 },
94 Input: in,
9195 }
9296 }
9397