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

Side by Side Diff: logdog/server/collector/coordinator/cache_test.go

Issue 2575383002: Add server/cache support to gaeconfig. (Closed)
Patch Set: Un-collapse. Created 3 years, 11 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package coordinator 5 package coordinator
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "sync" 9 "sync"
10 "sync/atomic" 10 "sync/atomic"
11 "testing" 11 "testing"
12 "time" 12 "time"
13 13
14 "github.com/luci/luci-go/common/clock/testclock" 14 "github.com/luci/luci-go/common/clock/testclock"
15 "github.com/luci/luci-go/common/errors" 15 "github.com/luci/luci-go/common/errors"
16 "github.com/luci/luci-go/logdog/common/types" 16 "github.com/luci/luci-go/logdog/common/types"
17 "github.com/luci/luci-go/luci_config/common/cfgtypes" 17 "github.com/luci/luci-go/luci_config/common/cfgtypes"
18
18 "golang.org/x/net/context" 19 "golang.org/x/net/context"
19 20
20 . "github.com/smartystreets/goconvey/convey" 21 . "github.com/smartystreets/goconvey/convey"
21 ) 22 )
22 23
23 // testCoordinator is an implementation of Coordinator that can be used for 24 // testCoordinator is an implementation of Coordinator that can be used for
24 // testing. 25 // testing.
25 type testCoordinator struct { 26 type testCoordinator struct {
26 // calls is the number of calls made to the interface's methods. 27 // calls is the number of calls made to the interface's methods.
27 calls int32 28 calls int32
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 remotes := 0 388 remotes := 0
388 for i := 0; i < count; i++ { 389 for i := 0; i < count; i++ {
389 if state[i].ProtoVersion == "remote" { 390 if state[i].ProtoVersion == "remote" {
390 remotes++ 391 remotes++
391 } 392 }
392 } 393 }
393 So(remotes, ShouldEqual, count) 394 So(remotes, ShouldEqual, count)
394 }) 395 })
395 }) 396 })
396 } 397 }
OLDNEW
« no previous file with comments | « logdog/server/collector/coordinator/cache.go ('k') | logdog/server/collector/coordinator/coordinator.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698