Skip to content

Conversation

@jiasli
Copy link
Member

@jiasli jiasli commented Apr 7, 2022

Description

Fix #21954

test_restore_file added by #21712 randomly fails:

https://dev.azure.com/azure-sdk/public/_build/results?buildId=1485372&view=logs&j=c846b3e8-69b8-5dbd-1a39-4905d81e6a95&t=9ebb608a-8a51-5834-bad0-46e2c03d2282

2022-04-06T09:12:24.1762149Z =================================== FAILURES ===================================
2022-04-06T09:12:24.1762678Z ________ AzureNetAppFilesSnapshotServiceScenarioTest.test_restore_file _________
2022-04-06T09:12:24.1763782Z [gw0] linux -- Python 3.8.13 /opt/az/bin/python3
2022-04-06T09:12:24.1764428Z /opt/az/lib/python3.8/site-packages/azure/cli/testsdk/base.py:139: in tearDown
2022-04-06T09:12:24.1764907Z     super(ScenarioTest, self).tearDown()
2022-04-06T09:12:24.1765318Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2022-04-06T09:12:24.1765529Z 
2022-04-06T09:12:24.1766025Z self = <command_modules.netappfiles.tests.latest.test_snapshot_commands.AzureNetAppFilesSnapshotServiceScenarioTest testMethod=test_restore_file>
2022-04-06T09:12:24.1766574Z 
2022-04-06T09:12:24.1766877Z     def tearDown(self):
2022-04-06T09:12:24.1767226Z         os.environ = self.original_env
2022-04-06T09:12:24.1767596Z         # Autorest.Python 2.x
2022-04-06T09:12:24.1768058Z         assert not [t for t in threading.enumerate() if t.name.startswith("AzureOperationPoller")], \
2022-04-06T09:12:24.1768837Z             "You need to call 'result' or 'wait' on all AzureOperationPoller you have created"
2022-04-06T09:12:24.1769322Z         # Autorest.Python 3.x
2022-04-06T09:12:24.1769765Z >       assert not [t for t in threading.enumerate() if t.name.startswith("LROPoller")], \
2022-04-06T09:12:24.1770495Z             "You need to call 'result' or 'wait' on all LROPoller you have created"
2022-04-06T09:12:24.1771247Z E       AssertionError: You need to call 'result' or 'wait' on all LROPoller you have created
2022-04-06T09:12:24.1771563Z 
2022-04-06T09:12:24.1772203Z /opt/az/lib/python3.8/site-packages/azure/cli/testsdk/scenario_tests/base.py:156: AssertionError
2022-04-06T09:12:24.1772976Z ---------- generated xml file: /azure_cli_test_result/netappfiles.xml ----------
2022-04-06T09:12:24.1773527Z =========================== short test summary info ============================
2022-04-06T09:12:24.1774147Z FAILED tests/latest/test_snapshot_commands.py::AzureNetAppFilesSnapshotServiceScenarioTest::test_restore_file

Change

Return the result of SnapshotsOperations.begin_restore_files so that the returned LROPoller is polled by CLI core.

@ghost ghost requested a review from yonzhan April 7, 2022 08:09
@ghost ghost added the Auto-Assign Auto assign by bot label Apr 7, 2022
@ghost ghost requested a review from kairu-ms April 7, 2022 08:09
@ghost ghost assigned kairu-ms Apr 7, 2022
@ghost ghost added this to the Apr 2022 (2022-04-26) milestone Apr 7, 2022
@ghost ghost added the NetAppFiles az netappfiles label Apr 7, 2022
@jiasli
Copy link
Member Author

jiasli commented Apr 7, 2022

I am not able to rerun the test test_restore_file with my subscription:

> azdev test test_restore_file --discover --live
...
E           Code: LocationNotAvailableForResourceType
E           Message: The provided location 'southcentralusstage' is not available for resource type 'Microsoft.NetApp/netAppAccounts'. List of available regions for the resource type is 'australiacentral,australiacentral2,australiaeast,australiasoutheast,brazilsouth,canadacentral,canadaeast,centralindia,centralus,eastasia,eastus,eastus2,francecentral,germanynorth,germanywestcentral,japaneast,japanwest,koreacentral,northcentralus,northeurope,norwayeast,norwaywest,southcentralus,southindia,southeastasia,switzerlandnorth,switzerlandwest,uaenorth,uaecentral,uksouth,ukwest,westeurope,westus,westus2,westus3,centraluseuap'.

@jiasli jiasli requested a review from wangzelin007 April 7, 2022 09:28
@jiasli
Copy link
Member Author

jiasli commented Apr 7, 2022

@hildurhodd, please help re-record the test after this PR is merged.

@jiasli jiasli requested a review from hildurhodd April 7, 2022 09:31
@jiasli jiasli merged commit ec1bf84 into Azure:dev Apr 8, 2022
@jiasli jiasli deleted the netappfiles branch April 8, 2022 04:31
@hildurhodd
Copy link
Contributor

I fixed this in this PR #21955, I'll update it so the test and recordings can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot NetAppFiles az netappfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[netappfiles] test_restore_file randomly fails: AssertionError: You need to call 'result' or 'wait' on all LROPoller you have created

5 participants