Skip to content

[Storage] Fix sync list_shares test leaking shares due to wrong cleanup prefix#47595

Merged
weirongw23-msft merged 1 commit into
Azure:mainfrom
weirongw23-msft:weirongw23/fix-live-tests-xd
Jun 22, 2026
Merged

[Storage] Fix sync list_shares test leaking shares due to wrong cleanup prefix#47595
weirongw23-msft merged 1 commit into
Azure:mainfrom
weirongw23-msft:weirongw23/fix-live-tests-xd

Conversation

@weirongw23-msft

Copy link
Copy Markdown
Member

test_list_shares_with_num_results_and_marker created shares with the "listshare" prefix but called self._delete_shares() with no argument, which defaults to TEST_SHARE_PREFIX ("share"). Since "listshare*" names do not start with "share", the cleanup matched nothing and leaked the shares onto the account.

Pass the "listshare" prefix to _delete_shares() so the test removes the shares it created, matching the async version.

@weirongw23-msft weirongw23-msft marked this pull request as ready for review June 22, 2026 18:59
Copilot AI review requested due to automatic review settings June 22, 2026 18:59
@github-actions github-actions Bot added the Storage Storage Service (Queues, Blobs, Files) label Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a resource-leak bug in the synchronous file-share test suite. The test test_list_shares_with_num_results_and_marker created shares using the "listshare" prefix but cleaned up with the default prefix "share", so cleanup matched nothing and left shares on the account. The fix passes the correct prefix to _delete_shares(), aligning the sync test with its async equivalent.

Changes:

  • Pass the "listshare" prefix to _delete_shares() so the test cleans up the shares it actually created.

@weirongw23-msft weirongw23-msft merged commit af54c26 into Azure:main Jun 22, 2026
22 of 23 checks passed
@weirongw23-msft weirongw23-msft deleted the weirongw23/fix-live-tests-xd branch June 22, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants