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

Unified Diff: impl/memory/datastore_query_execution_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « impl/memory/datastore_query_execution.go ('k') | impl/memory/datastore_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/datastore_query_execution_test.go
diff --git a/impl/memory/datastore_query_execution_test.go b/impl/memory/datastore_query_execution_test.go
index b358051a761b37d2c9331c222c6f6f79721639b0..2a030b9c2455b075083a39564920f325bb0bb046 100644
--- a/impl/memory/datastore_query_execution_test.go
+++ b/impl/memory/datastore_query_execution_test.go
@@ -324,7 +324,7 @@ var queryExecutionTests = []qExTest{
q := nq("").Gt("__key__", key("Kind", 2))
- err := data.Run(q, func(pm ds.PropertyMap, gc ds.CursorCB) bool {
+ err := data.Run(q, func(pm ds.PropertyMap, gc ds.CursorCB) error {
So(pm, ShouldResemble, pmap(
"$key", key("Kind", 2, "__entity_group__", 1), Next,
"__version__", 1))
@@ -332,13 +332,13 @@ var queryExecutionTests = []qExTest{
err := error(nil)
curs, err = gc()
So(err, ShouldBeNil)
- return false
+ return ds.Stop
})
So(err, ShouldBeNil)
- err = data.Run(q.Start(curs), func(pm ds.PropertyMap, gc ds.CursorCB) bool {
+ err = data.Run(q.Start(curs), func(pm ds.PropertyMap) error {
So(pm, ShouldResemble, stage1Data[2])
- return false
+ return ds.Stop
})
So(err, ShouldBeNil)
},
@@ -346,9 +346,7 @@ var queryExecutionTests = []qExTest{
func(c context.Context) {
data := ds.Get(c)
q := nq("Something").Eq("Does", 2).Order("Not", "-Work")
- So(data.Run(q, func(ds.Key, ds.CursorCB) bool {
- return true
- }), ShouldErrLike, strings.Join([]string{
+ So(data.Run(q, func(ds.Key) {}), ShouldErrLike, strings.Join([]string{
"Consider adding:",
"- kind: Something",
" properties:",
@@ -362,9 +360,7 @@ var queryExecutionTests = []qExTest{
func(c context.Context) {
data := ds.Get(c)
q := nq("Something").Ancestor(key("Kind", 3)).Order("Val")
- So(data.Run(q, func(ds.Key, ds.CursorCB) bool {
- return true
- }), ShouldErrLike, strings.Join([]string{
+ So(data.Run(q, func(ds.Key) {}), ShouldErrLike, strings.Join([]string{
"Consider adding:",
"- kind: Something",
" ancestor: yes",
« no previous file with comments | « impl/memory/datastore_query_execution.go ('k') | impl/memory/datastore_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698