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

Unified Diff: impl/memory/taskqueue_test.go

Issue 1494223002: Add API to allow you to get the non-transactional datastore or taskqueue. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix doc and naming 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/taskqueue.go ('k') | impl/prod/context.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/taskqueue_test.go
diff --git a/impl/memory/taskqueue_test.go b/impl/memory/taskqueue_test.go
index 50cb1b02e674eec67cd0b4012dbaf2a901feb6ed..eb2de337aea324b5c6b4e29c2ef91d1c2d022cdf 100644
--- a/impl/memory/taskqueue_test.go
+++ b/impl/memory/taskqueue_test.go
@@ -370,6 +370,16 @@ func TestTaskQueue(t *testing.T) {
}, nil), ShouldBeNil)
})
+ Convey("can get the non-transactional taskqueue context though", func() {
+ So(dsS.Get(c).RunInTransaction(func(c context.Context) error {
+ So(tqS.GetNoTxn(c).Delete(t, ""), ShouldBeNil)
+ So(tqS.GetNoTxn(c).Purge(""), ShouldBeNil)
+ _, err := tqS.GetNoTxn(c).Stats("")
+ So(err, ShouldBeNil)
+ return nil
+ }, nil), ShouldBeNil)
+ })
+
Convey("adding a new task only happens if we don't errout", func() {
So(dsS.Get(c).RunInTransaction(func(c context.Context) error {
t3 := tq.NewTask("/sandwitch/victory")
« no previous file with comments | « impl/memory/taskqueue.go ('k') | impl/prod/context.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698