Skip to content

Commit 8ed1412

Browse files
hizixinCopilot
andauthored
[Search] Add 2026-04-01 GA test coverage and recordings (#46684)
* [Search] Add 2026-04-01 GA test coverage and recordings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [Search] Strengthen test coverage and recordings Add targeted unit coverage for SDK-owned Search behavior, including buffered sender defaults, processing checks, context managers, field helpers, and SearchClient metadata accessors. Restore meaningful live coverage for knowledge resource ETags and buffered sender upload replacement and delete behavior. Refresh buffered sender recordings and update the asset tag. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e87e00f commit 8ed1412

74 files changed

Lines changed: 7315 additions & 7100 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sdk/search/azure-search-documents/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/search/azure-search-documents",
5-
"Tag": "python/search/azure-search-documents_35a2c408d6"
5+
"Tag": "python/search/azure-search-documents_575b3d2518"
66
}

sdk/search/azure-search-documents/azure/search/documents/aio/_operations/_patch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ async def _index_documents_actions(
200200
result_first_half = batch_response_first_half
201201
else:
202202
result_first_half = []
203-
batch_response_second_half = await self._index_documents_actions(actions=batch.actions[pos:], **kwargs)
203+
batch_response_second_half = await self._index_documents_actions(
204+
batch=_models.IndexDocumentsBatch(actions=batch.actions[pos:]), **kwargs
205+
)
204206
if batch_response_second_half:
205207
result_second_half = batch_response_second_half
206208
else:

sdk/search/azure-search-documents/azure/search/documents/aio/_patch.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ async def _process(self, timeout: int = 86400, **kwargs) -> bool:
221221
if result.succeeded:
222222
await self._callback_succeed(action)
223223
elif is_retryable_status_code(result.status_code):
224-
self._retry_action(action)
224+
await self._retry_action(action)
225225
has_error = True
226226
else:
227227
await self._callback_fail(action)
@@ -231,7 +231,7 @@ async def _process(self, timeout: int = 86400, **kwargs) -> bool:
231231
return has_error
232232
except Exception: # pylint: disable=broad-except
233233
for action in actions:
234-
self._retry_action(action)
234+
await self._retry_action(action)
235235
if raise_error:
236236
raise
237237
return True
@@ -354,9 +354,9 @@ async def __aexit__(self, *args) -> None:
354354
await self.close()
355355
await self._client.__aexit__(*args)
356356

357-
def _retry_action(self, action: IndexAction) -> None:
357+
async def _retry_action(self, action: IndexAction) -> None:
358358
if not self._index_key:
359-
asyncio.create_task(self._callback_fail(action))
359+
await self._callback_fail(action)
360360
return
361361
key = cast(str, action.get(self._index_key) if action else "")
362362
counter = self._retry_counter.get(key)
@@ -369,7 +369,7 @@ def _retry_action(self, action: IndexAction) -> None:
369369
self._retry_counter[key] = counter + 1
370370
self._index_documents_batch.enqueue_actions(action)
371371
else:
372-
asyncio.create_task(self._callback_fail(action))
372+
await self._callback_fail(action)
373373

374374
async def _callback_succeed(self, action: IndexAction) -> None:
375375
if self._on_remove:

0 commit comments

Comments
 (0)