From 69c883a5598117c13db8d806ce0beb103e366f81 Mon Sep 17 00:00:00 2001 From: Yabo Hu Date: Wed, 6 Jul 2022 08:58:13 +0800 Subject: [PATCH] temporarily skip import azaccount in parallel (#18870) --- tools/Test/SmokeTest/RmCoreSmokeTests.ps1 | 46 +++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/tools/Test/SmokeTest/RmCoreSmokeTests.ps1 b/tools/Test/SmokeTest/RmCoreSmokeTests.ps1 index f306f7ce95c3..0fdafc62471d 100644 --- a/tools/Test/SmokeTest/RmCoreSmokeTests.ps1 +++ b/tools/Test/SmokeTest/RmCoreSmokeTests.ps1 @@ -162,29 +162,29 @@ $resourceTestCommands = @( @{Name = "Az.Websites"; Command = {Get-AzWebApp -ResourceGroupName $resourceGroupName}} ) -$generalCommands = @( - @{ - Name = "Import Az.Accounts in Parallel"; - Command = { - if ($null -ne $env:SYSTEM_DEFINITIONID) { - Write-Host "Skipping because 'Start-Job' is not supported by design in scenarios where PowerShell is being hosted in other applications." - return - } - $importJobs = @() - 1..10 | ForEach-Object { - $importJobs += Start-Job -name "import-no.$_" -ScriptBlock { Import-Module Az.Accounts; Get-AzConfig; } - } - $importJobs | Wait-Job - $importJobs | Receive-Job - $importJobs | ForEach-Object { - if ("Completed" -ne $_.State) { - throw "Some jobs have failed." - } - } - }; - Retry = 0; # no need to retry - } -) +# $generalCommands = @( +# @{ +# Name = "Import Az.Accounts in Parallel"; +# Command = { +# if ($null -ne $env:SYSTEM_DEFINITIONID) { +# Write-Host "Skipping because 'Start-Job' is not supported by design in scenarios where PowerShell is being hosted in other applications." +# return +# } +# $importJobs = @() +# 1..10 | ForEach-Object { +# $importJobs += Start-Job -name "import-no.$_" -ScriptBlock { Import-Module Az.Accounts; Get-AzConfig; } +# } +# $importJobs | Wait-Job +# $importJobs | Receive-Job +# $importJobs | ForEach-Object { +# if ("Completed" -ne $_.State) { +# throw "Some jobs have failed." +# } +# } +# }; +# Retry = 0; # no need to retry +# } +# ) if($Reverse.IsPresent){ [array]::Reverse($resourceTestCommands)