Skip to content

Commit b97359d

Browse files
committed
test: Update telemetry test for lock-free queue
Changed _events_batch to _events_queue.qsize() to match the lock-free queue implementation
1 parent c76610e commit b97359d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unit/test_telemetry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ def test_event_batching_and_flushing_flow(self, mock_telemetry_client):
8080
client._export_event("event1")
8181
client._export_event("event2")
8282
mock_send.assert_not_called()
83-
assert len(client._events_batch) == 2
83+
assert client._events_queue.qsize() == 2
8484

8585
# Third event should trigger flush
8686
client._export_event("event3")
8787
mock_send.assert_called_once()
88-
assert len(client._events_batch) == 0 # Batch cleared after flush
88+
assert client._events_queue.qsize() == 0 # Queue cleared after flush
8989

9090
@patch("databricks.sql.common.unified_http_client.UnifiedHttpClient.request")
9191
def test_network_request_flow(self, mock_http_request, mock_telemetry_client):

0 commit comments

Comments
 (0)