| Index: go/src/infra/gae/libs/gae/memory/memcache_test.go
|
| diff --git a/go/src/infra/gae/libs/gae/memory/memcache_test.go b/go/src/infra/gae/libs/gae/memory/memcache_test.go
|
| index 0829aa40185f6da07d4d7b1ec71ddfdcaaa19da0..fc36b0f81f1844488c38b8166c402c12a4974825 100644
|
| --- a/go/src/infra/gae/libs/gae/memory/memcache_test.go
|
| +++ b/go/src/infra/gae/libs/gae/memory/memcache_test.go
|
| @@ -23,8 +23,6 @@ func TestMemcache(t *testing.T) {
|
| c, tc := testclock.UseTime(context.Background(), now)
|
| c = Use(c)
|
| mc := gae.GetMC(c)
|
| - mci := gae.GetMC(c).(*memcacheImpl)
|
| - So(mc, ShouldNotEqual, mci) // two impls with the same memcacheData
|
|
|
| Convey("implements MCSingleReadWriter", func() {
|
| Convey("Add", func() {
|
| @@ -39,12 +37,6 @@ func TestMemcache(t *testing.T) {
|
| err := mc.Add(itm)
|
| So(err, ShouldEqual, gae.ErrMCNotStored)
|
| })
|
| -
|
| - Convey("which can be broken intentionally", func() {
|
| - mci.BreakFeatures(nil, "Add")
|
| - err := mc.Add(itm)
|
| - So(err, ShouldEqual, gae.ErrMCServerError)
|
| - })
|
| })
|
|
|
| Convey("Get", func() {
|
| @@ -71,12 +63,6 @@ func TestMemcache(t *testing.T) {
|
| So(err, ShouldEqual, gae.ErrMCCacheMiss)
|
| So(i, ShouldBeNil)
|
| })
|
| -
|
| - Convey("which can be broken intentionally", func() {
|
| - mci.BreakFeatures(nil, "Get")
|
| - _, err := mc.Get("sup")
|
| - So(err, ShouldEqual, gae.ErrMCServerError)
|
| - })
|
| })
|
|
|
| Convey("Delete", func() {
|
| @@ -101,12 +87,6 @@ func TestMemcache(t *testing.T) {
|
| err := mc.Delete("sup")
|
| So(err, ShouldEqual, gae.ErrMCCacheMiss)
|
| })
|
| -
|
| - Convey("and can be broken", func() {
|
| - mci.BreakFeatures(nil, "Delete")
|
| - err := mc.Delete("sup")
|
| - So(err, ShouldEqual, gae.ErrMCServerError)
|
| - })
|
| })
|
|
|
| Convey("Set", func() {
|
| @@ -130,12 +110,6 @@ func TestMemcache(t *testing.T) {
|
| i, err := mc.Get("sup")
|
| So(err, ShouldBeNil)
|
| So(i, ShouldResemble, testItem)
|
| -
|
| - Convey("and can be broken", func() {
|
| - mci.BreakFeatures(nil, "Set")
|
| - err := mc.Set(itm)
|
| - So(err, ShouldEqual, gae.ErrMCServerError)
|
| - })
|
| })
|
|
|
| Convey("CompareAndSwap", func() {
|
| @@ -169,12 +143,6 @@ func TestMemcache(t *testing.T) {
|
| err = mc.CompareAndSwap(itm)
|
| So(err, ShouldEqual, gae.ErrMCNotStored)
|
| })
|
| -
|
| - Convey("and can be broken", func() {
|
| - mci.BreakFeatures(nil, "CompareAndSwap")
|
| - err = mc.CompareAndSwap(itm)
|
| - So(err, ShouldEqual, gae.ErrMCServerError)
|
| - })
|
| })
|
| })
|
|
|
| @@ -186,6 +154,8 @@ func TestMemcache(t *testing.T) {
|
| expiration: time.Second * 2,
|
| })
|
|
|
| + mci := mc.(*memcacheImpl)
|
| +
|
| So(err, ShouldBeNil)
|
| So(len(mci.data.items), ShouldEqual, 1)
|
| So(mci.data.casID, ShouldEqual, 1)
|
|
|