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

Unified Diff: impl/memory/datastore_test.go

Issue 2604943002: impl/memory: Replace gkvlite with "treapstore". (Closed)
Patch Set: Comments. Created 3 years, 11 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 | « impl/memory/datastore_index_test.go ('k') | impl/memory/doc.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/datastore_test.go
diff --git a/impl/memory/datastore_test.go b/impl/memory/datastore_test.go
index c9580f0f7f1af8cad4585884b1ab52948557a426..0d884a9da018de30adad1cfbc6e20885dce96d0d 100644
--- a/impl/memory/datastore_test.go
+++ b/impl/memory/datastore_test.go
@@ -665,11 +665,6 @@ func TestCompoundIndexes(t *testing.T) {
return "idx::" + string(serialize.ToBytes(*def.PrepForIdxTable()))
}
- numItms := func(c memCollection) uint64 {
- ret, _ := c.GetTotals()
- return ret
- }
-
Convey("Test Compound indexes", t, func() {
type Model struct {
ID int64 `gae:"$id"`
@@ -691,22 +686,22 @@ func TestCompoundIndexes(t *testing.T) {
},
}
- coll := head.GetCollection(idxKey(idx))
+ coll := head.Snapshot().GetCollection(idxKey(idx))
So(coll, ShouldNotBeNil)
- So(numItms(coll), ShouldEqual, 2)
+ So(countItems(coll), ShouldEqual, 2)
idx.SortBy[0].Property = "Field1"
- coll = head.GetCollection(idxKey(idx))
+ coll = head.Snapshot().GetCollection(idxKey(idx))
So(coll, ShouldNotBeNil)
- So(numItms(coll), ShouldEqual, 2)
+ So(countItems(coll), ShouldEqual, 2)
idx.SortBy = append(idx.SortBy, ds.IndexColumn{Property: "Field1"})
So(head.GetCollection(idxKey(idx)), ShouldBeNil)
t.AddIndexes(&idx)
- coll = head.GetCollection(idxKey(idx))
+ coll = head.Snapshot().GetCollection(idxKey(idx))
So(coll, ShouldNotBeNil)
- So(numItms(coll), ShouldEqual, 4)
+ So(countItems(coll), ShouldEqual, 4)
})
}
« no previous file with comments | « impl/memory/datastore_index_test.go ('k') | impl/memory/doc.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698