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

Side by Side Diff: server/logdog/storage/bigtable/bigtable_test.go

Issue 1610993002: LogDog: Add collector service implementation. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Comments, rebase. Created 4 years, 10 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
« no previous file with comments | « server/logdog/storage/bigtable/bigtable.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package bigtable 5 package bigtable
6 6
7 import ( 7 import (
8 "fmt"
9 "testing" 8 "testing"
10 9
11 "github.com/luci/luci-go/common/errors" 10 "github.com/luci/luci-go/common/errors"
11 "github.com/luci/luci-go/common/grpcutil"
12 . "github.com/smartystreets/goconvey/convey" 12 . "github.com/smartystreets/goconvey/convey"
13 ) 13 )
14 14
15 func TestBigTable(t *testing.T) { 15 func TestBigTable(t *testing.T) {
16 t.Parallel() 16 t.Parallel()
17 17
18 Convey(`A nil error is not marked transient.`, t, func() { 18 Convey(`A nil error is not marked transient.`, t, func() {
19 So(wrapTransient(nil), ShouldBeNil) 19 So(wrapTransient(nil), ShouldBeNil)
20 }) 20 })
21 21
22 Convey(`A regular error is not marked transient.`, t, func() { 22 Convey(`A regular error is not marked transient.`, t, func() {
23 » » So(errors.IsTransient(wrapTransient(fmt.Errorf("boring error"))) , ShouldBeFalse) 23 » » So(grpcutil.IsTransient(grpcutil.Canceled), ShouldBeFalse)
24 » » So(errors.IsTransient(wrapTransient(grpcutil.Canceled)), ShouldB eFalse)
24 }) 25 })
25 26
26 » Convey(`An error containing "Internal error encountered" is marked trans ient.`, t, func() { 27 » Convey(`An gRPC transient error is marked transient.`, t, func() {
27 » » So(errors.IsTransient(wrapTransient(fmt.Errorf("Hey, Internal er ror encountered!"))), ShouldBeTrue) 28 » » So(grpcutil.IsTransient(grpcutil.Internal), ShouldBeTrue)
29 » » So(errors.IsTransient(wrapTransient(grpcutil.Internal)), ShouldB eTrue)
28 }) 30 })
29 } 31 }
OLDNEW
« no previous file with comments | « server/logdog/storage/bigtable/bigtable.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698