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

Side by Side Diff: filter/txnBuf/txnbuf_test.go

Issue 2011773002: datastore: variadic Get, Put, Exists, Delete. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Created 4 years, 7 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
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 txnBuf 5 package txnBuf
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "fmt" 9 "fmt"
10 "math/rand" 10 "math/rand"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 So(18, fooSetTo(ds), hugeField) 374 So(18, fooSetTo(ds), hugeField)
375 375
376 // We're over threshold! But the child will dele te most of this and 376 // We're over threshold! But the child will dele te most of this and
377 // bring us back to normal. 377 // bring us back to normal.
378 So(ds.RunInTransaction(func(c context.Context) e rror { 378 So(ds.RunInTransaction(func(c context.Context) e rror {
379 ds := datastore.Get(c) 379 ds := datastore.Get(c)
380 keys := make([]*datastore.Key, len(hugeD ata)) 380 keys := make([]*datastore.Key, len(hugeD ata))
381 for i, d := range hugeData { 381 for i, d := range hugeData {
382 keys[i] = ds.KeyForObj(d) 382 keys[i] = ds.KeyForObj(d)
383 } 383 }
384 » » » » » return ds.DeleteMulti(keys) 384 » » » » » return ds.DeleteMulti(keys...)
385 }, nil), ShouldBeNil) 385 }, nil), ShouldBeNil)
386 386
387 return nil 387 return nil
388 }, &datastore.TransactionOptions{XG: true}), ShouldBeNil ) 388 }, &datastore.TransactionOptions{XG: true}), ShouldBeNil )
389 389
390 So(18, fooShouldHave(ds), hugeField) 390 So(18, fooShouldHave(ds), hugeField)
391 }) 391 })
392 }) 392 })
393 } 393 }
394 394
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 val := pm["Value"] 901 val := pm["Value"]
902 So(val[len(val)-1].Value(), ShouldResemb le, "wat") 902 So(val[len(val)-1].Value(), ShouldResemb le, "wat")
903 }), ShouldBeNil) 903 }), ShouldBeNil)
904 }) 904 })
905 905
906 }) 906 })
907 907
908 }) 908 })
909 909
910 } 910 }
OLDNEW
« no previous file with comments | « no previous file | impl/memory/datastore_query_execution_test.go » ('j') | service/datastore/datastore.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698