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

Unified Diff: impl/memory/taskqueue.go

Issue 1282673002: Make obtaining the Testable interface actually part of the interface. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/taskqueue_data.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/taskqueue.go
diff --git a/impl/memory/taskqueue.go b/impl/memory/taskqueue.go
index 2af0f5a7117f4345322c298b1d7ddad19003c98d..9ac3e5287d6b80ba66b140edee33f39d75a376ca 100644
--- a/impl/memory/taskqueue.go
+++ b/impl/memory/taskqueue.go
@@ -145,6 +145,10 @@ func (t *taskqueueImpl) Stats(queueNames []string, cb tq.RawStatsCB) error {
return nil
}
+func (t *taskqueueImpl) Testable() tq.Testable {
+ return t
+}
+
/////////////////////////////// taskqueueTxnImpl ///////////////////////////////
type taskqueueTxnImpl struct {
@@ -222,6 +226,10 @@ func (t *taskqueueTxnImpl) Stats([]string, tq.RawStatsCB) error {
return errors.New("taskqueue: cannot Stats from a transaction")
}
+func (t *taskqueueTxnImpl) Testable() tq.Testable {
+ return t
+}
+
////////////////////////////// private functions ///////////////////////////////
var validTaskName = regexp.MustCompile("^[0-9a-zA-Z\\-\\_]{0,500}$")
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/taskqueue_data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698