Skip to content

Commit 97d6312

Browse files
authored
test(spanner): add sleep to fix flaky test (#4289)
Co-authored-by: larkee <[email protected]>
1 parent a7a5f36 commit 97d6312

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spanner/cloud-client/snippets_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ def test_query_data_with_string(capsys):
363363

364364

365365
def test_query_data_with_timestamp_parameter(capsys):
366+
# Wait 5 seconds to avoid a time drift issue for the next query:
367+
# https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4197.
368+
time.sleep(5)
366369
snippets.query_data_with_timestamp_parameter(INSTANCE_ID, DATABASE_ID)
367370
out, _ = capsys.readouterr()
368371
assert 'VenueId: 4, VenueName: Venue 4, LastUpdateTime:' in out

0 commit comments

Comments
 (0)