diff --git a/src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1 b/src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1 index 2ae19d98c70d..522e0e728eaf 100644 --- a/src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1 +++ b/src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1 @@ -3089,17 +3089,17 @@ function Test-ApplicationGatewayPrivateEndpointWorkFlows $approve = Approve-AzPrivateEndpointConnection -ResourceId $connection.Id Assert-NotNull $approve; Assert-AreEqual "Approved" $approve.PrivateLinkServiceConnectionState.Status - Start-Sleep -s 30 + Start-TestSleep -s 30 # Deny Connection $deny = Deny-AzPrivateEndpointConnection -ResourceId $connection.Id Assert-NotNull $deny; Assert-AreEqual "Rejected" $deny.PrivateLinkServiceConnectionState.Status - Start-Sleep -s 30 + Start-TestSleep -s 30 # Remove Connection $remove = Remove-AzPrivateEndpointConnection -ResourceId $connection.Id -Force - Start-Sleep -s 30 + Start-TestSleep -s 30 # Verify PrivateEndpointConnections on Application Gateway $getgw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $rgname diff --git a/src/Resources/Resources.Test/ScenarioTests/InvokeResourceActionTests.ps1 b/src/Resources/Resources.Test/ScenarioTests/InvokeResourceActionTests.ps1 index 1647e76bce10..47f310048147 100644 --- a/src/Resources/Resources.Test/ScenarioTests/InvokeResourceActionTests.ps1 +++ b/src/Resources/Resources.Test/ScenarioTests/InvokeResourceActionTests.ps1 @@ -46,7 +46,9 @@ function Test-InvokeResourceActionsWithResouceId $statusChanged = $true break } - start-sleep -seconds 20 + if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) { + start-sleep -seconds 20 + } } Assert-True { $statusChanged } diff --git a/src/Resources/Resources.Test/ScenarioTests/ResourceTests.ps1 b/src/Resources/Resources.Test/ScenarioTests/ResourceTests.ps1 index e979827fd12d..54aaec4589a8 100644 --- a/src/Resources/Resources.Test/ScenarioTests/ResourceTests.ps1 +++ b/src/Resources/Resources.Test/ScenarioTests/ResourceTests.ps1 @@ -889,7 +889,9 @@ function Test-SetAResourceTagCase # Set resource (add a new tag with key testTag2 = "TestVal2") Set-AzResource -Tags @{testtag = "testval"; testTag2 = "TestVal2"} -ResourceGroupName $rgname -ResourceName $rname -ResourceType $resourceType -Properties @{"key2" = "value2"} -Force - Start-Sleep -s 30 + if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) { + Start-Sleep -s 30 + } $resource = Get-AzResource -ResourceGroupName $rgname -ResourceName $rname -ResourceType $resourceType # Verify tag keys @@ -908,7 +910,9 @@ function Test-SetAResourceTagCase # Set resource (replace tags with keys of different cases) Set-AzResource -Tags @{testTag = "testVAL"; testtag2 = "Testval2"} -ResourceGroupName $rgname -ResourceName $rname -ResourceType $resourceType -Properties @{"key2" = "value2"} -Force - Start-Sleep -s 30 + if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) { + Start-Sleep -s 30 + } $resource = Get-AzResource -ResourceGroupName $rgname -ResourceName $rname -ResourceType $resourceType # Verify tag keys