mirror of https://github.com/grpc/grpc-go.git
opencensus: stop overwriting ctx parameter in tests (#6350)
This commit is contained in:
parent
68576b3c42
commit
81c513a49c
|
|
@ -1342,8 +1342,6 @@ func (fe *fakeExporter) ExportSpan(sd *trace.SpanData) {
|
||||||
// list in an exporter. Returns an error if no server span found within the
|
// list in an exporter. Returns an error if no server span found within the
|
||||||
// passed context's timeout.
|
// passed context's timeout.
|
||||||
func waitForServerSpan(ctx context.Context, fe *fakeExporter) error {
|
func waitForServerSpan(ctx context.Context, fe *fakeExporter) error {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
|
|
||||||
defer cancel()
|
|
||||||
for ; ctx.Err() == nil; <-time.After(time.Millisecond) {
|
for ; ctx.Err() == nil; <-time.After(time.Millisecond) {
|
||||||
fe.mu.Lock()
|
fe.mu.Lock()
|
||||||
for _, seenSpan := range fe.seenSpans {
|
for _, seenSpan := range fe.seenSpans {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue