| Index: server/internal/logdog/collector/coordinator/cache_test.go
|
| diff --git a/server/internal/logdog/collector/coordinator/cache_test.go b/server/internal/logdog/collector/coordinator/cache_test.go
|
| index 8686b103f4e385a1affa3c33b6ff4e7b0fa72758..a5d47107801c6182112634bdac6c92974351380f 100644
|
| --- a/server/internal/logdog/collector/coordinator/cache_test.go
|
| +++ b/server/internal/logdog/collector/coordinator/cache_test.go
|
| @@ -231,9 +231,9 @@ func TestStreamStateCache(t *testing.T) {
|
| So(tcc.calls, ShouldEqual, 2)
|
| })
|
|
|
| - Convey(`A registration error will result in a RegisterStream error.`, func() {
|
| + Convey(`A transient registration error will result in a RegisterStream error.`, func() {
|
| tcc.errC = make(chan error, 1)
|
| - tcc.errC <- errors.New("test error")
|
| + tcc.errC <- errors.WrapTransient(errors.New("test error"))
|
|
|
| _, err := ssc.RegisterStream(c, &st, nil)
|
| So(err, ShouldNotBeNil)
|
| @@ -248,6 +248,23 @@ func TestStreamStateCache(t *testing.T) {
|
| })
|
| })
|
|
|
| + Convey(`A non-transient registration error will result in a RegisterStream error.`, func() {
|
| + tcc.errC = make(chan error, 1)
|
| + tcc.errC <- errors.New("test error")
|
| +
|
| + _, err := ssc.RegisterStream(c, &st, nil)
|
| + So(err, ShouldNotBeNil)
|
| + So(tcc.calls, ShouldEqual, 1)
|
| +
|
| + Convey(`A second registration will return the same error and not make a new request.`, func() {
|
| + tcc.errC = nil
|
| +
|
| + _, err := ssc.RegisterStream(c, &st, nil)
|
| + So(err, ShouldNotBeNil)
|
| + So(tcc.calls, ShouldEqual, 1)
|
| + })
|
| + })
|
| +
|
| Convey(`Different projects with the sme stream name will not conflict.`, func() {
|
| var projects = []config.ProjectName{"", "foo", "bar"}
|
|
|
|
|