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

Side by Side Diff: impl/memory/datastore_query_execution_test.go

Issue 1335083002: Add emulation of transaction retries to memory impl of RunInTransaction. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: add Testable() to non-Raw interfaces Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « impl/memory/datastore.go ('k') | impl/memory/datastore_test.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 package memory 5 package memory
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "testing" 9 "testing"
10 "time" 10 "time"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 func TestQueryExecution(t *testing.T) { 304 func TestQueryExecution(t *testing.T) {
305 t.Parallel() 305 t.Parallel()
306 306
307 Convey("Test query execution", t, func() { 307 Convey("Test query execution", t, func() {
308 c, err := info.Get(Use(context.Background())).Namespace("ns") 308 c, err := info.Get(Use(context.Background())).Namespace("ns")
309 if err != nil { 309 if err != nil {
310 panic(err) 310 panic(err)
311 } 311 }
312 312
313 data := ds.Get(c) 313 data := ds.Get(c)
314 » » testing := data.Raw().Testable() 314 » » testing := data.Testable()
315 315
316 for _, tc := range queryExecutionTests { 316 for _, tc := range queryExecutionTests {
317 Convey(tc.name, func() { 317 Convey(tc.name, func() {
318 for i, stage := range tc.test { 318 for i, stage := range tc.test {
319 // outside of Convey, since these must a lways happen 319 // outside of Convey, since these must a lways happen
320 testing.CatchupIndexes() 320 testing.CatchupIndexes()
321 321
322 testing.AddIndexes(stage.addIdxs...) 322 testing.AddIndexes(stage.addIdxs...)
323 if err := data.PutMulti(stage.putEnts); err != nil { 323 if err := data.PutMulti(stage.putEnts); err != nil {
324 // prevent Convey from thinking this assertion should show up in 324 // prevent Convey from thinking this assertion should show up in
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 Convey(fmt.Sprintf("extr aFn %d", j), func() { 373 Convey(fmt.Sprintf("extr aFn %d", j), func() {
374 fn(c) 374 fn(c)
375 }) 375 })
376 } 376 }
377 }) 377 })
378 } 378 }
379 }) 379 })
380 } 380 }
381 }) 381 })
382 } 382 }
OLDNEW
« no previous file with comments | « impl/memory/datastore.go ('k') | impl/memory/datastore_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698