Skip to content

Commit ead8d8b

Browse files
authored
Use non-sending client fixture in test_grpc_client_max_spans (#1917)
The test appeared to be causing a segfault in py3.12, perhaps due to being short-lived (as it wasn't waiting for anything to be sent to the sending_elasticapm_client, or closing it). It didn't actually need the sending version, so hopefully this fixes that issue 🤞
1 parent 78bef8c commit ead8d8b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/contrib/grpc/grpc_client_tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ def test_grpc_client_unsampled_transaction(instrument, sending_elasticapm_client
239239
assert len(payloads) == 1 # only the server_version request
240240

241241

242-
@pytest.mark.parametrize("sending_elasticapm_client", [{"transaction_max_spans": 1}], indirect=True)
243-
def test_grpc_client_max_spans(instrument, sending_elasticapm_client, grpc_client_and_server_url):
242+
@pytest.mark.parametrize("elasticapm_client", [{"transaction_max_spans": 1}], indirect=True)
243+
def test_grpc_client_max_spans(instrument, elasticapm_client, grpc_client_and_server_url):
244244
grpc_client, _ = grpc_client_and_server_url
245-
transaction = sending_elasticapm_client.begin_transaction("request")
245+
transaction = elasticapm_client.begin_transaction("request")
246246
_ = grpc_client.GetServerResponse(Message(message="foo"))
247247
_ = grpc_client.GetServerResponse(Message(message="bar"))
248-
sending_elasticapm_client.end_transaction("grpc-test")
248+
elasticapm_client.end_transaction("grpc-test")
249249
assert transaction.dropped_spans == 1
250250

251251

0 commit comments

Comments
 (0)