Skip to content

Commit

Permalink
add sleep to test that sometimes fails
Browse files Browse the repository at this point in the history
  • Loading branch information
rpmcginty committed Jun 30, 2024
1 parent 0b4d592 commit 9796cb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/aibs_informatics_aws_utils/ecr/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,10 +790,10 @@ def test__resolve_image_uri__returns_latest_image_for_repo_uri(self):
self.assertEqual(resolve_image_uri(repo.repository_name), image1.uri)
self.assertEqual(resolve_image_uri(repo.uri), image1.uri)

# wait for 1 second to ensure that the image pushed at time is different
# wait for 1.1 seconds to ensure that the image pushed at time is different
# Moto does not support time resolution less than 1 second
sleep(
(image1.image_pushed_at + datetime.timedelta(seconds=1)).timestamp()
(image1.image_pushed_at + datetime.timedelta(seconds=1, milliseconds=100)).timestamp()
- datetime.datetime.now().timestamp()
)
image2 = self.put_image(repo.repository_name, image_tag="v2", seed=234)
Expand Down

0 comments on commit 9796cb8

Please sign in to comment.