Skip to content

Commit 690f7c4

Browse files
committed
Minor fix to flaky access condition tests
1 parent 1b81a23 commit 690f7c4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/blob/test_append_blob.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,9 @@ def test_append_block_from_url_with_if_modified(self):
437437

438438
# Act part 2: put block from url with failing condition
439439
with self.assertRaises(AzureHttpError):
440+
# make sure sufficient time has passed
441+
if not self.is_playback():
442+
self.sleep(2)
440443
self.bs.append_block_from_url(self.container_name, dest_blob_name, self.source_blob_url,
441444
source_range_start=0, source_range_end=SOURCE_BLOB_SIZE - 1,
442445
if_modified_since=resource_properties.last_modified)

tests/blob/test_page_blob.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,9 @@ def test_update_page_from_url_with_if_modified(self):
535535

536536
# Act part 2: put block from url with failing condition
537537
with self.assertRaises(AzureHttpError):
538+
# make sure sufficient time has passed
539+
if not self.is_playback():
540+
self.sleep(2)
538541
self.bs.update_page_from_url(self.container_name, dest_blob_name, start_range=0,
539542
end_range=SOURCE_BLOB_SIZE - 1, copy_source_url=self.source_blob_url,
540543
source_range_start=0, if_modified_since=resource_properties.last_modified)

0 commit comments

Comments
 (0)