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

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

Issue 2551973004: client/isolate: add context to NewChecker func (Closed)
Patch Set: Rebase 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') | client/cmd/isolate/exp_archive.go » ('j') | 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 eb395406f4f42ceee09611fa8446e044667840f7..5c5fdac420a52e00d0d91d608dd67cc6bd9bd653 100644
--- a/client/cmd/isolate/checker_test.go
+++ b/client/cmd/isolate/checker_test.go
@@ -60,7 +60,7 @@ func (f *fakeIsolateService) Contains(_ context.Context, digests []*service.Hand
func TestChecker(t *testing.T) {
fake := &fakeIsolateService{}
- checker := newChecker(fake)
+ checker := newChecker(context.Background(), fake)
type itemPair struct {
item *Item
@@ -113,7 +113,7 @@ func TestChecker(t *testing.T) {
func TestCheckerDelay(t *testing.T) {
batchc := make(chan []*service.HandlersEndpointsV1Digest, 2)
fake := &fakeIsolateService{batchc: batchc}
- checker := newChecker(fake)
+ checker := newChecker(context.Background(), fake)
nop := func(item *Item, ps *isolatedclient.PushState) {}
checker.AddItem(&Item{Digest: "aaa"}, false, nop)
@@ -139,13 +139,13 @@ func TestCheckerDelay(t *testing.T) {
func TestCheckerErrors(t *testing.T) {
// Make an error channel which sends errBang on the second receive.
errc := make(chan error, 2)
- errBang := errors.New("bang!")
+ errBang := errors.New("bang")
errc <- nil
errc <- errBang
close(errc)
fake := &fakeIsolateService{errc: errc}
- checker := newChecker(fake)
+ checker := newChecker(context.Background(), fake)
nop := func(item *Item, ps *isolatedclient.PushState) {}
for i := 0; i < 150; i++ {
« no previous file with comments | « client/cmd/isolate/checker.go ('k') | client/cmd/isolate/exp_archive.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698