Skip to content

Commit 28c6bb1

Browse files
ensure table is empty on no initial link s
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 5a43686 commit 28c6bb1

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

tests/unit/test_sea_queue.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -378,19 +378,17 @@ def test_init_no_initial_links(
378378
):
379379
"""Test initialization with no initial links."""
380380
# Create a queue with empty initial links
381-
with pytest.raises(
382-
ServerOperationError, match="No initial link found for chunk 0"
383-
):
384-
queue = SeaCloudFetchQueue(
385-
result_data=ResultData(external_links=[]),
386-
max_download_threads=5,
387-
ssl_options=ssl_options,
388-
sea_client=mock_sea_client,
389-
statement_id="test-statement-123",
390-
total_chunk_count=0,
391-
lz4_compressed=False,
392-
description=description,
393-
)
381+
queue = SeaCloudFetchQueue(
382+
result_data=ResultData(external_links=[]),
383+
max_download_threads=5,
384+
ssl_options=ssl_options,
385+
sea_client=mock_sea_client,
386+
statement_id="test-statement-123",
387+
total_chunk_count=0,
388+
lz4_compressed=False,
389+
description=description,
390+
)
391+
assert queue.table is None
394392

395393
@patch("databricks.sql.backend.sea.queue.logger")
396394
def test_progress_chunk_link_no_current_link(self, mock_logger):

0 commit comments

Comments
 (0)