[Storage] Fixed live tests relating to File Share#47558
Merged
weirongw23-msft merged 3 commits intoJun 18, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a few File Share live tests in azure-storage-file-share that were flaky or non-deterministic when run against a real storage account containing pre-existing shares. The list-shares tests previously assumed the account had only the shares created by the test; the fixes scope assertions to the specific share(s) under test.
Changes:
- Filter
list_shares()results by the test's own share name intest_list_shares_leased_share(sync and async) and tighten the count assertion from>= 1to== 1. - Remove a redundant
share_names.sort()(commented-out in the sync test, active in the async test) intest_list_shares_with_num_results_and_marker, since the share names are already created in sorted order.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
sdk/storage/azure-storage-file-share/tests/test_share.py |
Scopes the leased-share list assertion to the test's share and removes a redundant commented-out sort. |
sdk/storage/azure-storage-file-share/tests/test_share_async.py |
Mirrors the sync change: filters listed shares by name with == 1 assertion and drops the now-unnecessary share_names.sort(). |
jalauzon-msft
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.