Azure / autorest.powershell

AutoRest PowerShell Generator
MIT License
112 stars 81 forks source link

Need a way to sleep in the test script #1279

Closed wyunchi-ms closed 8 months ago

wyunchi-ms commented 10 months ago

Current if we want to sleep in the Recprd mode, we need call Start-Sleep in the test script. But this will also sleep that long in the Playback mode. Find a way to run mocked sleep in Playback mode will save about 40 mins for our full autorest test..

isra-fel commented 10 months ago

Short term: create a Start-TestSleep that can skip sleeping in playback mode to replace Start-Sleep. Ref: https://github.com/Azure/azure-powershell/blob/main/tools/TestFx/Common.ps1#L643

Long term: add a linting rule to detect Start-Sleep in test cases.

dolauli commented 8 months ago

@vidai-msft Please close the issue if it has been implemented.

vidai-msft commented 8 months ago

Issue resolved by PRs #23625 and #23650