From 4335729a26a196cf9dc0b6e2b4860335f0b6b3a8 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 28 May 2024 17:36:52 +0400 Subject: [PATCH] Remove unneeded refreshes --- test_elasticsearch/test_async/test_server/test_helpers.py | 4 ---- test_elasticsearch/test_server/test_helpers.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/test_elasticsearch/test_async/test_server/test_helpers.py b/test_elasticsearch/test_async/test_server/test_helpers.py index 5d5ce3d17..76517519b 100644 --- a/test_elasticsearch/test_async/test_server/test_helpers.py +++ b/test_elasticsearch/test_async/test_server/test_helpers.py @@ -129,7 +129,6 @@ async def test_all_errors_from_chunk_are_raised_on_failure(self, async_client): mappings={"properties": {"a": {"type": "integer"}}}, settings={"number_of_shards": 1, "number_of_replicas": 0}, ) - await async_client.cluster.health(wait_for_status="yellow") try: async for ok, item in helpers.async_streaming_bulk( @@ -338,7 +337,6 @@ async def test_errors_are_reported_correctly(self, async_client): mappings={"properties": {"a": {"type": "integer"}}}, settings={"number_of_shards": 1, "number_of_replicas": 0}, ) - await async_client.cluster.health(wait_for_status="yellow") success, failed = await helpers.async_bulk( async_client, @@ -364,7 +362,6 @@ async def test_error_is_raised(self, async_client): mappings={"properties": {"a": {"type": "integer"}}}, settings={"number_of_shards": 1, "number_of_replicas": 0}, ) - await async_client.cluster.health(wait_for_status="yellow") with pytest.raises(helpers.BulkIndexError): await helpers.async_bulk(async_client, [{"a": 42}, {"a": "c"}], index="i") @@ -408,7 +405,6 @@ async def test_errors_are_collected_properly(self, async_client): mappings={"properties": {"a": {"type": "integer"}}}, settings={"number_of_shards": 1, "number_of_replicas": 0}, ) - await async_client.cluster.health(wait_for_status="yellow") success, failed = await helpers.async_bulk( async_client, diff --git a/test_elasticsearch/test_server/test_helpers.py b/test_elasticsearch/test_server/test_helpers.py index 0763be03c..454c84863 100644 --- a/test_elasticsearch/test_server/test_helpers.py +++ b/test_elasticsearch/test_server/test_helpers.py @@ -82,7 +82,6 @@ def test_bulk_all_errors_from_chunk_are_raised_on_failure(sync_client): "settings": {"number_of_shards": 1, "number_of_replicas": 0}, }, ) - sync_client.cluster.health(wait_for_status="yellow") try: for ok, _ in helpers.streaming_bulk( @@ -325,7 +324,6 @@ def test_errors_are_reported_correctly(sync_client): mappings={"properties": {"a": {"type": "integer"}}}, settings={"number_of_shards": 1, "number_of_replicas": 0}, ) - sync_client.cluster.health(wait_for_status="yellow") success, failed = helpers.bulk( sync_client, @@ -352,7 +350,6 @@ def test_error_is_raised(sync_client): mappings={"properties": {"a": {"type": "integer"}}}, settings={"number_of_shards": 1, "number_of_replicas": 0}, ) - sync_client.cluster.health(wait_for_status="yellow") with pytest.raises(helpers.BulkIndexError): helpers.bulk( @@ -399,7 +396,6 @@ def test_errors_are_collected_properly(sync_client): mappings={"properties": {"a": {"type": "integer"}}}, settings={"number_of_shards": 1, "number_of_replicas": 0}, ) - sync_client.cluster.health(wait_for_status="yellow") success, failed = helpers.bulk( sync_client,