Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit 83beb3a

Browse files
committed
test fix
1 parent 941d2e1 commit 83beb3a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/unit/test_batch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515

1616
import unittest
17+
from tests import _helpers as ot_helpers
1718
from unittest.mock import MagicMock
1819
from tests._helpers import (
1920
OpenTelemetryBase,
@@ -608,7 +609,7 @@ def _test_batch_write_with_request_options(
608609
("x-goog-spanner-route-to-leader", "true"),
609610
]
610611

611-
if enable_end_to_end_tracing:
612+
if enable_end_to_end_tracing and ot_helpers.HAS_OPENTELEMETRY_INSTALLED:
612613
expected_metadata.append(("x-goog-spanner-end-to-end-tracing", "true"))
613614
self.assertTrue(
614615
any(key == "traceparent" for key, _ in metadata),

0 commit comments

Comments
 (0)