diff --git a/src/internal/functions/Set-AzOpsContext.ps1 b/src/internal/functions/Set-AzOpsContext.ps1 index 89af6256..73cb5f56 100644 --- a/src/internal/functions/Set-AzOpsContext.ps1 +++ b/src/internal/functions/Set-AzOpsContext.ps1 @@ -26,7 +26,7 @@ if (-not $ScopeObject.Subscription) { return } if ($context.Subscription.Id -ne $ScopeObject.Subscription) { Write-AzOpsMessage -LogLevel InternalComment -LogString 'Set-AzOpsContext.Change' -LogStringValues $context.Subscription.Name, $ScopeObject.SubscriptionDisplayName, $ScopeObject.Subscription - Set-AzContext -SubscriptionId $scopeObject.Subscription -WhatIf:$false + $null = Set-AzContext -SubscriptionId $scopeObject.Subscription -WhatIf:$false } } } \ No newline at end of file diff --git a/src/tests/integration/Repository.Tests.ps1 b/src/tests/integration/Repository.Tests.ps1 index ec89b013..06bea35d 100644 --- a/src/tests/integration/Repository.Tests.ps1 +++ b/src/tests/integration/Repository.Tests.ps1 @@ -1144,7 +1144,7 @@ Describe "Repository" { $diff3 = New-TimeSpan -Start $createTime.changeTime[1] -End $createTime.changeTime[2] $diff4 = New-TimeSpan -Start $createTime.changeTime[0] -End $createTime.changeTime[3] # Check if time difference is within x seconds - $allowedDiff = '8' + $allowedDiff = '25' if ($diff1.TotalSeconds -le $allowedDiff -and $diff2.TotalSeconds -le $allowedDiff -and $diff3.TotalSeconds -le $allowedDiff -and $diff4.TotalSeconds -ge $allowedDiff) { # Time difference is within x seconds of each other $timeTest = "good"