Skip to content

Commit 79d0a62

Browse files
author
Nori Zhang
committed
Merge branch 'nori/az-accounts' of https://github.com/Azure/azure-powershell into nori/az-accounts
2 parents dc48713 + 202c1d4 commit 79d0a62

File tree

69 files changed

+3504
-418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3504
-418
lines changed

documentation/breaking-changes/upcoming-breaking-changes.md

Lines changed: 942 additions & 6 deletions
Large diffs are not rendered by default.

src/Accounts/Accounts/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Deduplicated subscriptions belonging to multiple tenants while using `Get-AzSubscription` with parameter `SubscriptionName`. [#19427]
2223

2324
## Version 2.10.1
2425
* Deduplicated subscriptions belonging to multiple tenants while using `Get-AzSubscription` with parameter `SubscriptionName`. [#19427]

src/Batch/Batch.Test/ScenarioTests/Common.ps1

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
1414

15-
<#
16-
.SYNOPSIS
17-
Sleeps but only during recording.
18-
#>
19-
function Start-TestSleep($milliseconds)
20-
{
21-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
22-
{
23-
Start-Sleep -Milliseconds $milliseconds
24-
}
25-
}
26-
2715
function Compute-TestTimeout($seconds)
2816
{
2917
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -eq [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)

src/Batch/Batch.Test/ScenarioTests/ComputeNodeTests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function Test-RemoveComputeNodes
4343
{
4444
throw [System.TimeoutException] "Timed out waiting for compute nodes to enter LeavingPool state"
4545
}
46-
Start-TestSleep 1000
46+
Start-TestSleep -Seconds 1
4747
$computeNodes = Get-AzBatchComputeNode -PoolId $poolId -Select $select -BatchContext $context
4848
}
4949
}
@@ -140,7 +140,7 @@ function WaitForIdleComputeNode
140140
{
141141
throw [System.TimeoutException] "Timed out waiting for idle compute node"
142142
}
143-
Start-TestSleep 5000
143+
Start-TestSleep -Seconds 5
144144
$computeNode = Get-AzBatchComputeNode -Id $computeNodeId -PoolId $poolId -BatchContext $context -Select "id,state"
145145
}
146146
}

src/Batch/Batch.Test/ScenarioTests/JobTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function Test-DisableEnableTerminateJob
7474
Disable-AzBatchJob $jobId Terminate -BatchContext $context
7575

7676
# Sleep a bit in Record mode since the job doesn't immediately switch to Disabled.
77-
Start-TestSleep 10000
77+
Start-TestSleep -Seconds 10
7878

7979
# Verify the job was Disabled
8080
$job = Get-AzBatchJob $jobId -BatchContext $context

src/Compute/Compute/Extension/VmssDiskEncryption/Scripts/AzureDiskEncryption_VMSS.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $ErrorActionPreference = “Stop”;
6666
else
6767
{
6868
Write-Host "Sleeping 10 seconds to actiavate AzureDiskEncryption-VMSS feature . Retry count : ($i)";
69-
Start-Sleep -Seconds 10;
69+
Start-TestSleep -Seconds 10
7070
}
7171
}
7272
if(!$vmssDiskEncryptionFeature -or $vmssDiskEncryptionFeature.RegistrationState -ne 'Registered')

src/CosmosDB/CosmosDB.Test/ScenarioTests/ManagedCassandraOperationsTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function Test-ManagedCassandraCreateUpdateGetCmdlets
8585
{
8686
break
8787
}
88-
Start-Sleep -s 1
88+
Start-TestSleep -Seconds 1
8989
}
9090
$response = Get-AzManagedCassandraCluster -ResourceId $clusterId
9191
Assert-AreEqual 3 $response.Properties.ExternalSeedNodes.Count

src/CosmosDB/CosmosDB.Test/ScenarioTests/RestoreTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ function Test-UpdateCosmosDBAccountBackupPolicyCmdLet {
345345
}
346346

347347
$updatedCosmosDBAccount = Update-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName -BackupPolicyType Continuous
348-
Start-Sleep -s 50
348+
Start-TestSleep -Seconds 50
349349

350350
$updatedCosmosDBAccount = Get-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName
351351
Assert-NotNull $updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState

src/DataFactory/DataFactoryV2.Test/ScenarioTests/RunTests.ps1

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,21 @@ function Test-Run
5454
Get-AzDataFactoryV2PipelineRun -DataFactory $df -PipelineRunId $Run
5555

5656
# Wait run to finish before rerun
57-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
58-
Start-Sleep -s 120
59-
}
57+
Start-TestSleep -Seconds 120
6058

6159
# Trying rerun the pipeline run
6260
$Rerun = Invoke-AzDataFactoryV2Pipeline -ResourceGroupName $rgname -PipelineName $pipelineName -DataFactoryName $dfname -ReferencePipelineRunId $Run -IsRecovery
6361
Get-AzDataFactoryV2PipelineRun -DataFactory $df -PipelineRunId $Rerun
6462

6563
# Wait run to finish before rerun
66-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
67-
Start-Sleep -s 120
68-
}
64+
Start-TestSleep -Seconds 120
6965

7066
# Trying rerun from activity MyCopyActivity_1_0
7167
$RerunFromActivity = Invoke-AzDataFactoryV2Pipeline -ResourceGroupName $rgname -PipelineName $pipelineName -DataFactoryName $dfname -ReferencePipelineRunId $Run -IsRecovery -StartActivityName MyCopyActivity_1_0
7268
Get-AzDataFactoryV2PipelineRun -DataFactory $df -PipelineRunId $RerunFromActivity
7369

7470
# Wait run to finish before rerun
75-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
76-
Start-Sleep -s 120
77-
}
71+
Start-TestSleep -Seconds 120
7872

7973
# Trying rerun from failed activity
8074
$RerunFromFailedActivity = Invoke-AzDataFactoryV2Pipeline -ResourceGroupName $rgname -PipelineName $pipelineName -DataFactoryName $dfname -ReferencePipelineRunId $Run -IsRecovery -StartFromFailure

src/DataFactory/DataFactoryV2.Test/ScenarioTests/TriggerTests.ps1

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ function Test-TriggerRun
120120

121121
Assert-AreEqual 'Started' $started.RuntimeState
122122

123-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
124-
Start-Sleep -s 150
125-
}
123+
Start-TestSleep -Seconds 150
126124

127125
$endDate = $startDate.AddYears(1)
128126
$triggerRuns = Get-AzDataFactoryV2TriggerRun -ResourceGroupName $rgname -DataFactoryName $dfname -TriggerName $triggername -TriggerRunStartedAfter $startDate -TriggerRunStartedBefore $endDate
@@ -184,9 +182,7 @@ function Test-BlobEventTriggerSubscriptions
184182
Add-AzDataFactoryV2TriggerSubscription -ResourceGroupName $rgname -DataFactoryName $dfname -Name $triggername
185183
$status = Get-AzDataFactoryV2TriggerSubscriptionStatus -ResourceGroupName $rgname -DataFactoryName $dfname -Name $triggername
186184
while ($status.Status -ne "Enabled"){
187-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
188-
Start-Sleep -s 150
189-
}
185+
Start-TestSleep -Seconds 150
190186
$status = Get-AzDataFactoryV2TriggerSubscriptionStatus -ResourceGroupName $rgname -DataFactoryName $dfname -Name $triggername
191187
}
192188

@@ -248,9 +244,7 @@ function Test-BlobEventTriggerSubscriptionsByInputObject
248244
Add-AzDataFactoryV2TriggerSubscription $actual
249245
$status = Get-AzDataFactoryV2TriggerSubscriptionStatus $actual
250246
while ($status.Status -ne "Enabled"){
251-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
252-
Start-Sleep -s 150
253-
}
247+
Start-TestSleep -Seconds 150
254248
$status = Get-AzDataFactoryV2TriggerSubscriptionStatus $actual
255249
}
256250

@@ -312,9 +306,7 @@ function Test-BlobEventTriggerSubscriptionsByResourceId
312306
Add-AzDataFactoryV2TriggerSubscription -ResourceId $expected.Id
313307
$status = Get-AzDataFactoryV2TriggerSubscriptionStatus -ResourceId $expected.Id
314308
while ($status.Status -ne "Enabled"){
315-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
316-
Start-Sleep -s 150
317-
}
309+
Start-TestSleep -Seconds 150
318310
$status = Get-AzDataFactoryV2TriggerSubscriptionStatus -ResourceId $expected.Id
319311
}
320312

@@ -375,9 +367,7 @@ function Test-TriggerInvokeAndStop
375367

376368
Assert-AreEqual 'Started' $started.RuntimeState
377369

378-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
379-
Start-Sleep -s 150
380-
}
370+
Start-TestSleep -Seconds 150
381371

382372
$endDate = $startDate.AddYears(1)
383373
$triggerRuns = Get-AzDataFactoryV2TriggerRun -ResourceGroupName $rgname -DataFactoryName $dfname -TriggerName $triggername -TriggerRunStartedAfter $startDate -TriggerRunStartedBefore $endDate

0 commit comments

Comments
 (0)