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

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

Issue 1874563005: Archivist asserts completeness through keys scan. (Closed) Base URL: https://github.com/luci/luci-go@logdog-storage-keysonly
Patch Set: Remove unused members. Created 4 years, 8 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 "testing" 8 "testing"
9 "time" 9 "time"
10 10
11 "github.com/luci/luci-go/common/errors" 11 "github.com/luci/luci-go/common/errors"
12 "github.com/luci/luci-go/common/grpcutil"
13 "github.com/luci/luci-go/server/logdog/storage" 12 "github.com/luci/luci-go/server/logdog/storage"
14 "golang.org/x/net/context" 13 "golang.org/x/net/context"
15 "google.golang.org/cloud/bigtable" 14 "google.golang.org/cloud/bigtable"
16 15
17 . "github.com/smartystreets/goconvey/convey" 16 . "github.com/smartystreets/goconvey/convey"
18 ) 17 )
19 18
20 func TestBigTable(t *testing.T) { 19 func TestBigTable(t *testing.T) {
21 t.Parallel() 20 t.Parallel()
22 21
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 }) 77 })
79 78
80 Convey(`With return an error if the configuration fails to apply.`, func() { 79 Convey(`With return an error if the configuration fails to apply.`, func() {
81 bt.err = errors.New("test error") 80 bt.err = errors.New("test error")
82 81
83 So(s.Config(cfg), ShouldEqual, bt.err) 82 So(s.Config(cfg), ShouldEqual, bt.err)
84 }) 83 })
85 }) 84 })
86 }) 85 })
87 } 86 }
88
89 func TestBigTableErrors(t *testing.T) {
90 t.Parallel()
91
92 Convey(`A nil error is not marked transient.`, t, func() {
93 So(wrapTransient(nil), ShouldBeNil)
94 })
95
96 Convey(`A regular error is not marked transient.`, t, func() {
97 So(grpcutil.IsTransient(grpcutil.Canceled), ShouldBeFalse)
98 So(errors.IsTransient(wrapTransient(grpcutil.Canceled)), ShouldB eFalse)
99 })
100
101 Convey(`An gRPC transient error is marked transient.`, t, func() {
102 So(grpcutil.IsTransient(grpcutil.Internal), ShouldBeTrue)
103 So(errors.IsTransient(wrapTransient(grpcutil.Internal)), ShouldB eTrue)
104 })
105 }
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