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

Unified Diff: go/src/infra/gae/libs/meta/eg_test.go

Issue 1227203004: Convert 'Testable' interface into an optional filter. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@add_filters
Patch Set: final rebase Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « go/src/infra/gae/libs/memlock/memlock_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/gae/libs/meta/eg_test.go
diff --git a/go/src/infra/gae/libs/meta/eg_test.go b/go/src/infra/gae/libs/meta/eg_test.go
index 472bfcdcca509408962a4e5c79f7f0404a9a11d1..1a97c7a19563b4aaf7dd8a109220cdb92cb76f2f 100644
--- a/go/src/infra/gae/libs/meta/eg_test.go
+++ b/go/src/infra/gae/libs/meta/eg_test.go
@@ -5,11 +5,13 @@
package meta
import (
+ "errors"
"testing"
"golang.org/x/net/context"
"infra/gae/libs/gae"
+ "infra/gae/libs/gae/filters/featureBreaker"
"infra/gae/libs/gae/memory"
. "github.com/smartystreets/goconvey/convey"
@@ -20,6 +22,7 @@ func TestGetEntityGroupVersion(t *testing.T) {
Convey("GetEntityGroupVersion", t, func() {
c := memory.Use(context.Background())
+ c, fb := featureBreaker.FilterRDS(c, errors.New("INTERNAL_ERROR"))
rds := gae.GetRDS(c)
aKey, err := rds.Put(rds.NewKey("A", "", 0, nil), gae.DSPropertyMap{
@@ -41,8 +44,7 @@ func TestGetEntityGroupVersion(t *testing.T) {
So(err, ShouldBeNil)
So(v, ShouldEqual, 0)
- tDs := rds.(gae.Testable)
- tDs.BreakFeatures(nil, "Get")
+ fb.BreakFeatures(nil, "Get")
v, err = GetEntityGroupVersion(c, aKey)
So(err.Error(), ShouldContainSubstring, "INTERNAL_ERROR")
« no previous file with comments | « go/src/infra/gae/libs/memlock/memlock_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698