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

Unified Diff: service/datastore/testable.go

Issue 1366793002: Add Consistent(bool) to Testing interface (Closed) Base URL: https://github.com/luci/gae.git@move_serialization_helpers
Patch Set: fix errcheck in test... 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « impl/memory/datastore_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/testable.go
diff --git a/service/datastore/testable.go b/service/datastore/testable.go
index 483cb762314814090026bde53c001029b68e83f5..e03fb8e76eb5bcc069fb61bf1523e9a14ac51786 100644
--- a/service/datastore/testable.go
+++ b/service/datastore/testable.go
@@ -41,4 +41,12 @@ type Testable interface {
// transaction body pretending transaction conflicts happens. 0 (default)
// means commit succeeds on the first attempt (no retries).
SetTransactionRetryCount(int)
+
+ // Consistent controls the eventual consistency behavior of the testing
+ // implementation. If it is called with true, then this datastore
+ // implementation will be always-consistent, instead of eventually-consistent.
+ //
+ // By default the datastore is eventually consistent, and you must call
+ // CatchupIndexes or use Take/SetIndexSnapshot to manipulate the index state.
+ Consistent(always bool)
}
« no previous file with comments | « impl/memory/datastore_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698