Skip to content

Commit

Permalink
fix: move the sleep before applying bucket policy (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
sriram-mv committed Nov 23, 2019
1 parent 92a6a00 commit 65dd732
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration/publish/publish_app_integ_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def setUpClass(cls):
cls.s3_bucket = s3.Bucket(cls.bucket_name)
cls.s3_bucket.create()

# Given 3 seconds for all the bucket creation to complete
time.sleep(3)

# Grant serverlessrepo read access to the bucket
bucket_policy_template = cls.test_data_path.joinpath("s3_bucket_policy.json").read_text(encoding="utf-8")
bucket_policy = bucket_policy_template.replace(cls.bucket_name_placeholder, cls.bucket_name)
Expand All @@ -43,9 +46,6 @@ def setUpClass(cls):
code_body = cls.test_data_path.joinpath("main.py").read_text(encoding="utf-8")
cls.s3_bucket.put_object(Key="main.py", Body=code_body)

# Given 3 seconds for all the bucket creation to complete
time.sleep(3)

@classmethod
def tearDownClass(cls):
cls.s3_bucket.delete_objects(
Expand Down

0 comments on commit 65dd732

Please sign in to comment.