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

Side by Side Diff: impl/prod/everything_test.go

Issue 1521823003: Clean up callback interfaces. (Closed) Base URL: https://github.com/luci/gae.git@extra
Patch Set: fixins Created 5 years 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 | « impl/memory/gkvlite_iter_test.go ('k') | impl/prod/raw_datastore.go » ('j') | 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 // +build appengine 5 // +build appengine
6 6
7 package prod 7 package prod
8 8
9 import ( 9 import (
10 "testing" 10 "testing"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 ret := TestStruct{ID: orig.ID} 119 ret := TestStruct{ID: orig.ID}
120 So(ds.Get(&ret), ShouldBeNil) 120 So(ds.Get(&ret), ShouldBeNil)
121 So(ret, ShouldResemble, orig) 121 So(ret, ShouldResemble, orig)
122 122
123 // can't be sure the indexes have caught up... so sleep 123 // can't be sure the indexes have caught up... so sleep
124 time.Sleep(time.Second) 124 time.Sleep(time.Second)
125 125
126 Convey("Can query", func() { 126 Convey("Can query", func() {
127 q := datastore.NewQuery("TestStruct") 127 q := datastore.NewQuery("TestStruct")
128 » » » » ds.Run(q, func(ts *TestStruct, _ datastore.Curso rCB) bool { 128 » » » » ds.Run(q, func(ts *TestStruct) {
129 So(*ts, ShouldResemble, orig) 129 So(*ts, ShouldResemble, orig)
130 return true
131 }) 130 })
132 count, err := ds.Count(q) 131 count, err := ds.Count(q)
133 So(err, ShouldBeNil) 132 So(err, ShouldBeNil)
134 So(count, ShouldEqual, 1) 133 So(count, ShouldEqual, 1)
135 }) 134 })
136 135
137 Convey("Can project", func() { 136 Convey("Can project", func() {
138 q := datastore.NewQuery("TestStruct").Project("V alueS") 137 q := datastore.NewQuery("TestStruct").Project("V alueS")
139 rslts := []datastore.PropertyMap{} 138 rslts := []datastore.PropertyMap{}
140 So(ds.GetAll(q, &rslts), ShouldBeNil) 139 So(ds.GetAll(q, &rslts), ShouldBeNil)
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 So(tval, ShouldResemble, pm["Time"][0].Value()) 209 So(tval, ShouldResemble, pm["Time"][0].Value())
211 210
212 ent := datastore.PropertyMap{ 211 ent := datastore.PropertyMap{
213 "$key": {mpNI(ds.MakeKey("Something", "value"))} , 212 "$key": {mpNI(ds.MakeKey("Something", "value"))} ,
214 } 213 }
215 So(ds.Get(&ent), ShouldBeNil) 214 So(ds.Get(&ent), ShouldBeNil)
216 So(ent["Time"], ShouldResemble, pm["Time"]) 215 So(ent["Time"], ShouldResemble, pm["Time"])
217 }) 216 })
218 }) 217 })
219 } 218 }
OLDNEW
« no previous file with comments | « impl/memory/gkvlite_iter_test.go ('k') | impl/prod/raw_datastore.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698