Skip to content

Commit

Permalink
test: create big files so syncInputAttachments takes longer in sync i…
Browse files Browse the repository at this point in the history
…nput test (#444)

Signed-off-by: Yutong Li <[email protected]>
  • Loading branch information
YutongLi291 authored Oct 17, 2024
1 parent 9981824 commit 7d7d74f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/e2e/test_job_submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,10 +735,14 @@ def test_worker_reports_canceled_sync_input_actions_as_canceled(
# Create the input files to make sync inputs take a relatively long time
files_path: str = os.path.join(tmp_path, "files")
os.mkdir(files_path)
for i in range(2000):
for i in range(6000):
file_name: str = os.path.join(files_path, f"input_file_{i+1}.txt")
with open(file_name, "w+") as input_file:
input_file.write(f"{i}")
if i % 1000 == 0:
# Create some big files (1GB each) so the syncInputAttachments don't fail due to low transfer rates
input_file.write("A" * 1000000000)
else:
input_file.write(f"{i}")
config = configparser.ConfigParser()

set_setting("defaults.farm_id", deadline_resources.farm.id, config)
Expand Down

0 comments on commit 7d7d74f

Please sign in to comment.