Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: client/cmd/isolate/checker_test.go

Issue 2570433002: client/isolate: correctly propagate context.Context (Closed)
Patch Set: diff from other CL Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/cmd/isolate/checker.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cmd/isolate/checker_test.go
diff --git a/client/cmd/isolate/checker_test.go b/client/cmd/isolate/checker_test.go
index 5c5fdac420a52e00d0d91d608dd67cc6bd9bd653..b7a8e40ea92e38df4baa5cd5d1e02d04e9460ac9 100644
--- a/client/cmd/isolate/checker_test.go
+++ b/client/cmd/isolate/checker_test.go
@@ -36,7 +36,12 @@ type fakeIsolateService struct {
errc <-chan error
}
-func (f *fakeIsolateService) Contains(_ context.Context, digests []*service.HandlersEndpointsV1Digest) ([]*isolatedclient.PushState, error) {
+func (f *fakeIsolateService) Contains(ctx context.Context, digests []*service.HandlersEndpointsV1Digest) ([]*isolatedclient.PushState, error) {
+ select {
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ default:
+ }
f.mu.Lock()
defer f.mu.Unlock()
var states []*isolatedclient.PushState
« no previous file with comments | « client/cmd/isolate/checker.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698