We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e212361 commit a51257aCopy full SHA for a51257a
datastore/cloud-ndb/flask_app_test.py
@@ -14,8 +14,9 @@
14
15
import uuid
16
17
-import pytest
18
+import backoff
19
+import pytest
20
from google.cloud import ndb
21
22
import flask_app
@@ -39,9 +40,13 @@ def test_index(test_book):
39
40
flask_app.app.testing = True
41
client = flask_app.app.test_client()
42
- r = client.get('/')
43
- assert r.status_code == 200
44
- assert test_book.title in r.data.decode('utf-8')
+ @backoff.on_exception(backoff.expo, AssertionError, max_time=60)
+ def eventually_consistent_test():
45
+ r = client.get('/')
46
+ assert r.status_code == 200
47
+ assert test_book.title in r.data.decode('utf-8')
48
+
49
+ eventually_consistent_test()
50
51
52
def test_ndb_wsgi_middleware():
0 commit comments