Skip to content

Updated tests #614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/e2e/common/large_queries_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ def test_query_with_large_narrow_result_set(self):
assert row[0] == row_id

def test_long_running_query(self):
"""Incrementally increase query size until it takes at least 5 minutes,
"""Incrementally increase query size until it takes at least 3 minutes,
and asserts that the query completes successfully.
"""
minutes = 60
min_duration = 5 * minutes
min_duration = 3 * minutes

duration = -1
scale0 = 10000
Expand All @@ -113,5 +113,5 @@ def test_long_running_query(self):
duration = time.time() - start
current_fraction = duration / min_duration
print("Took {} s with scale factor={}".format(duration, scale_factor))
# Extrapolate linearly to reach 5 min and add 50% padding to push over the limit
# Extrapolate linearly to reach 3 min and add 50% padding to push over the limit
scale_factor = math.ceil(1.5 * scale_factor / current_fraction)
8 changes: 4 additions & 4 deletions tests/e2e/common/staging_ingestion_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_staging_ingestion_life_cycle(self, ingestion_user):
) as conn:

cursor = conn.cursor()
query = f"PUT '{temp_path}' INTO 'stage://tmp/{ingestion_user}/tmp/11/15/file1.csv' OVERWRITE"
query = f"PUT '{temp_path}' INTO 'stage://tmp/{ingestion_user}/tmp/11/16/file1.csv' OVERWRITE"
cursor.execute(query)

# GET should succeed
Expand All @@ -57,7 +57,7 @@ def test_staging_ingestion_life_cycle(self, ingestion_user):
extra_params={"staging_allowed_local_path": new_temp_path}
) as conn:
cursor = conn.cursor()
query = f"GET 'stage://tmp/{ingestion_user}/tmp/11/15/file1.csv' TO '{new_temp_path}'"
query = f"GET 'stage://tmp/{ingestion_user}/tmp/11/16/file1.csv' TO '{new_temp_path}'"
cursor.execute(query)

with open(new_fh, "rb") as fp:
Expand All @@ -67,7 +67,7 @@ def test_staging_ingestion_life_cycle(self, ingestion_user):

# REMOVE should succeed

remove_query = f"REMOVE 'stage://tmp/{ingestion_user}/tmp/11/15/file1.csv'"
remove_query = f"REMOVE 'stage://tmp/{ingestion_user}/tmp/11/16/file1.csv'"

with self.connection(extra_params={"staging_allowed_local_path": "/"}) as conn:
cursor = conn.cursor()
Expand All @@ -79,7 +79,7 @@ def test_staging_ingestion_life_cycle(self, ingestion_user):
Error, match="Staging operation over HTTP was unsuccessful: 404"
):
cursor = conn.cursor()
query = f"GET 'stage://tmp/{ingestion_user}/tmp/11/15/file1.csv' TO '{new_temp_path}'"
query = f"GET 'stage://tmp/{ingestion_user}/tmp/11/16/file1.csv' TO '{new_temp_path}'"
cursor.execute(query)

os.remove(temp_path)
Expand Down
Loading