Skip to content

Commit ffc7b27

Browse files
committed
fix: Revert session_id_hex in tests for functions that still use it
Only Error classes changed from session_id_hex to host_url. Other classes (TelemetryClient, ResultSetDownloadHandler, etc.) still use session_id_hex. Reverted: - test_telemetry.py: TelemetryClient and initialize_telemetry_client - test_downloader.py: ResultSetDownloadHandler - test_download_manager.py: ResultFileDownloadManager Kept as host_url: - test_client.py: Error class instantiation
1 parent da13b9e commit ffc7b27

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

tests/unit/test_download_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def create_download_manager(
2020
max_download_threads,
2121
lz4_compressed,
2222
ssl_options=SSLOptions(),
23-
host_url=Mock(),
23+
session_id_hex=Mock(),
2424
statement_id=Mock(),
2525
chunk_id=0,
2626
http_client=mock_http_client,

tests/unit/test_downloader.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_run_link_expired(self, mock_time):
5757
result_link,
5858
ssl_options=SSLOptions(),
5959
chunk_id=0,
60-
host_url=Mock(),
60+
session_id_hex=Mock(),
6161
statement_id=Mock(),
6262
http_client=mock_http_client,
6363
)
@@ -80,7 +80,7 @@ def test_run_link_past_expiry_buffer(self, mock_time):
8080
result_link,
8181
ssl_options=SSLOptions(),
8282
chunk_id=0,
83-
host_url=Mock(),
83+
session_id_hex=Mock(),
8484
statement_id=Mock(),
8585
http_client=mock_http_client,
8686
)
@@ -107,7 +107,7 @@ def test_run_get_response_not_ok(self, mock_time):
107107
result_link,
108108
ssl_options=SSLOptions(),
109109
chunk_id=0,
110-
host_url=Mock(),
110+
session_id_hex=Mock(),
111111
statement_id=Mock(),
112112
http_client=mock_http_client,
113113
)
@@ -137,7 +137,7 @@ def test_run_uncompressed_successful(self, mock_time):
137137
result_link,
138138
ssl_options=SSLOptions(),
139139
chunk_id=0,
140-
host_url=Mock(),
140+
session_id_hex=Mock(),
141141
statement_id=Mock(),
142142
http_client=mock_http_client,
143143
)
@@ -170,7 +170,7 @@ def test_run_compressed_successful(self, mock_time):
170170
result_link,
171171
ssl_options=SSLOptions(),
172172
chunk_id=0,
173-
host_url=Mock(),
173+
session_id_hex=Mock(),
174174
statement_id=Mock(),
175175
http_client=mock_http_client,
176176
)
@@ -194,7 +194,7 @@ def test_download_connection_error(self, mock_time):
194194
result_link,
195195
ssl_options=SSLOptions(),
196196
chunk_id=0,
197-
host_url=Mock(),
197+
session_id_hex=Mock(),
198198
statement_id=Mock(),
199199
http_client=mock_http_client,
200200
)
@@ -216,7 +216,7 @@ def test_download_timeout(self, mock_time):
216216
result_link,
217217
ssl_options=SSLOptions(),
218218
chunk_id=0,
219-
host_url=Mock(),
219+
session_id_hex=Mock(),
220220
statement_id=Mock(),
221221
http_client=mock_http_client,
222222
)

tests/unit/test_telemetry.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def mock_telemetry_client():
4646
):
4747
return TelemetryClient(
4848
telemetry_enabled=True,
49-
host_url=session_id,
49+
session_id_hex=session_id,
5050
auth_provider=auth_provider,
5151
host_url="test-host.com",
5252
executor=executor,
@@ -242,7 +242,7 @@ def test_client_lifecycle_flow(self):
242242
):
243243
TelemetryClientFactory.initialize_telemetry_client(
244244
telemetry_enabled=True,
245-
host_url=session_id_hex,
245+
session_id_hex=session_id_hex,
246246
auth_provider=auth_provider,
247247
host_url="test-host.com",
248248
batch_size=TelemetryClientFactory.DEFAULT_BATCH_SIZE,
@@ -267,7 +267,7 @@ def test_disabled_telemetry_creates_noop_client(self):
267267

268268
TelemetryClientFactory.initialize_telemetry_client(
269269
telemetry_enabled=False,
270-
host_url=session_id_hex,
270+
session_id_hex=session_id_hex,
271271
auth_provider=None,
272272
host_url="test-host.com",
273273
batch_size=TelemetryClientFactory.DEFAULT_BATCH_SIZE,
@@ -289,7 +289,7 @@ def test_factory_error_handling(self):
289289
):
290290
TelemetryClientFactory.initialize_telemetry_client(
291291
telemetry_enabled=True,
292-
host_url=session_id,
292+
session_id_hex=session_id,
293293
auth_provider=AccessTokenAuthProvider("token"),
294294
host_url="test-host.com",
295295
batch_size=TelemetryClientFactory.DEFAULT_BATCH_SIZE,
@@ -313,7 +313,7 @@ def test_factory_shutdown_flow(self):
313313
for session in [session1, session2]:
314314
TelemetryClientFactory.initialize_telemetry_client(
315315
telemetry_enabled=True,
316-
host_url=session,
316+
session_id_hex=session,
317317
auth_provider=AccessTokenAuthProvider("token"),
318318
host_url="test-host.com",
319319
batch_size=TelemetryClientFactory.DEFAULT_BATCH_SIZE,

0 commit comments

Comments
 (0)