OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-elasticsearch?expand=0&rev=54
36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
From 3c9680a5cf0b67a56356bf73173a7d5eabb2e552 Mon Sep 17 00:00:00 2001
|
|
From: Quentin Pradet <quentin.pradet@elastic.co>
|
|
Date: Wed, 28 May 2025 20:02:48 +0400
|
|
Subject: [PATCH] Stop using event_loop fixture (#2969)
|
|
|
|
It was removed in pytest-asyncio 1.0.
|
|
---
|
|
docs/reference/async.md | 3 +--
|
|
test_elasticsearch/test_async/test_transport.py | 6 ++++--
|
|
2 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
Index: elasticsearch-py-8.17.1/test_elasticsearch/test_async/test_transport.py
|
|
===================================================================
|
|
--- elasticsearch-py-8.17.1.orig/test_elasticsearch/test_async/test_transport.py
|
|
+++ elasticsearch-py-8.17.1/test_elasticsearch/test_async/test_transport.py
|
|
@@ -527,7 +527,8 @@ class TestTransport:
|
|
assert request_failed_in_error
|
|
assert len(client.transport.node_pool) == 3
|
|
|
|
- async def test_sniff_after_n_seconds(self, event_loop):
|
|
+ async def test_sniff_after_n_seconds(self):
|
|
+ event_loop = asyncio.get_running_loop()
|
|
client = AsyncElasticsearch( # noqa: F821
|
|
[NodeConfig("http", "localhost", 9200, _extras={"data": CLUSTER_NODES})],
|
|
node_class=DummyNode,
|
|
@@ -581,7 +582,8 @@ class TestTransport:
|
|
== "Sniffing should not be enabled when connecting to Elastic Cloud"
|
|
)
|
|
|
|
- async def test_sniff_on_start_close_unlocks_async_calls(self, event_loop):
|
|
+ async def test_sniff_on_start_close_unlocks_async_calls(self):
|
|
+ event_loop = asyncio.get_running_loop()
|
|
client = AsyncElasticsearch( # noqa: F821
|
|
[
|
|
NodeConfig(
|