19 votes
Accepted

How do I write tests against an eventually consistent service?

Consider non-functional requirements when designing your functional tests -- if your service has a non-functional requirement of "Consistent within x (seconds/minutes/etc)", simply run the PUT ...
Dan Ambrogio's user avatar
8 votes

How do I write tests against an eventually consistent service?

You really want your tests to be fast and consistent. If you start creating tests that may occasionally fail due to eventual consistency, you'll ignore the test when it fails, and then what use is it? ...
Jonathan Giddy's user avatar
8 votes

How do I write tests against an eventually consistent service?

OK, so. "What Are You Testing" is the key question. I am testing my internal logic of what happens assuming the google stuff works In this case you should mock the google services and always return ...
Ewan's user avatar
  • 75.8k
1 vote
Accepted

Synchronize local data with server data in an android application

You might want to look into Firebase's Realtime Database (also Google) instead of Cloud Datastore. It has Android/iOS/JavaScript SDK's and is designed to work offline with a client side cache, ...
Dan McGrath's user avatar
  • 11.2k
1 vote

How do I write tests against an eventually consistent service?

A service such as Google App Engine Datastore is based upon data replication across several globally spread points of presence (POP). Any integration test for an eventually consistent service is ...
Rami Kuttaineh's user avatar
1 vote

How do I write tests against an eventually consistent service?

One approach, which is nice in theory but might not always be practical, is to make all write operations in the system under test idempotent. That means, assuming your test code tests things in a ...
Robin Green's user avatar
  • 1,263

Only top scored, non community-wiki answers of a minimum length are eligible