From 00d8b3dee9e7a68c37b3d16b8a95ef642ba412c5 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Wed, 17 Jul 2024 20:37:01 +0000 Subject: [PATCH] Also add to observability tests --- src/python/grpcio_tests/tests/fork/BUILD.bazel | 1 + src/python/grpcio_tests/tests/observability/BUILD.bazel | 3 +++ .../tests/observability/_csm_observability_plugin_test.py | 4 ++++ .../tests/observability/_observability_plugin_test.py | 4 ++++ .../tests/observability/_open_telemetry_observability_test.py | 4 ++++ 5 files changed, 16 insertions(+) diff --git a/src/python/grpcio_tests/tests/fork/BUILD.bazel b/src/python/grpcio_tests/tests/fork/BUILD.bazel index f84a6cefd23..e47896c6603 100644 --- a/src/python/grpcio_tests/tests/fork/BUILD.bazel +++ b/src/python/grpcio_tests/tests/fork/BUILD.bazel @@ -19,6 +19,7 @@ pyx_library( deps = ["@com_google_absl//absl/debugging:failure_signal_handler"], visibility = [ "//src/python/grpcio_tests/tests_py3_only/interop:__subpackages__", + "//src/python/grpcio_tests/tests/observability:__subpackages__", ], ) diff --git a/src/python/grpcio_tests/tests/observability/BUILD.bazel b/src/python/grpcio_tests/tests/observability/BUILD.bazel index 20914412e2e..9fc86eb54bc 100644 --- a/src/python/grpcio_tests/tests/observability/BUILD.bazel +++ b/src/python/grpcio_tests/tests/observability/BUILD.bazel @@ -42,6 +42,7 @@ py_test( "//src/python/grpcio/grpc:grpcio", "//src/python/grpcio_observability/grpc_observability:pyobservability", "//src/python/grpcio_tests/tests/testing", + "//src/python/grpcio_tests/tests/fork:native_debug", requirement("opentelemetry-sdk"), ], ) @@ -57,6 +58,7 @@ py_test( "//src/python/grpcio/grpc:grpcio", "//src/python/grpcio_observability/grpc_observability:pyobservability", "//src/python/grpcio_tests/tests/testing", + "//src/python/grpcio_tests/tests/fork:native_debug", requirement("protobuf"), requirement("opentelemetry-sdk"), ], @@ -73,6 +75,7 @@ py_test( "//src/python/grpcio/grpc:grpcio", "//src/python/grpcio_csm_observability/grpc_csm_observability:csm_observability", "//src/python/grpcio_tests/tests/testing", + "//src/python/grpcio_tests/tests/fork:native_debug", requirement("protobuf"), requirement("opentelemetry-sdk"), ], diff --git a/src/python/grpcio_tests/tests/observability/_csm_observability_plugin_test.py b/src/python/grpcio_tests/tests/observability/_csm_observability_plugin_test.py index 20edc4d617c..686721ba8f8 100644 --- a/src/python/grpcio_tests/tests/observability/_csm_observability_plugin_test.py +++ b/src/python/grpcio_tests/tests/observability/_csm_observability_plugin_test.py @@ -43,6 +43,10 @@ from opentelemetry.sdk.metrics.export import MetricsData from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader from opentelemetry.sdk.resources import Resource +from src.python.grpcio_tests.tests.fork import native_debug + +native_debug.install_failure_signal_handler() + from tests.observability import _test_server logger = logging.getLogger(__name__) diff --git a/src/python/grpcio_tests/tests/observability/_observability_plugin_test.py b/src/python/grpcio_tests/tests/observability/_observability_plugin_test.py index 130e5f4c621..7eb1ca992e9 100644 --- a/src/python/grpcio_tests/tests/observability/_observability_plugin_test.py +++ b/src/python/grpcio_tests/tests/observability/_observability_plugin_test.py @@ -33,6 +33,10 @@ from opentelemetry.sdk.metrics.export import MetricExporter from opentelemetry.sdk.metrics.export import MetricsData from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader +from src.python.grpcio_tests.tests.fork import native_debug + +native_debug.install_failure_signal_handler() + from tests.observability import _test_server logger = logging.getLogger(__name__) diff --git a/src/python/grpcio_tests/tests/observability/_open_telemetry_observability_test.py b/src/python/grpcio_tests/tests/observability/_open_telemetry_observability_test.py index 37d9795fdf0..cb69fadfd35 100644 --- a/src/python/grpcio_tests/tests/observability/_open_telemetry_observability_test.py +++ b/src/python/grpcio_tests/tests/observability/_open_telemetry_observability_test.py @@ -36,6 +36,10 @@ from opentelemetry.sdk.metrics.export import MetricExporter from opentelemetry.sdk.metrics.export import MetricsData from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader +from src.python.grpcio_tests.tests.fork import native_debug + +native_debug.install_failure_signal_handler() + from tests.observability import _test_server logger = logging.getLogger(__name__)