@@ -72,7 +72,7 @@ param (
7272 [Parameter (ParameterSetName = " tenant" , Mandatory = $false )]
7373 [ValidateNotNullOrEmpty ()]
7474 [string ]$ResourceLocation = " local" ,
75- [parameter (HelpMessage = " Flag to cleanup resources after exception" )]
75+ [parameter (HelpMessage = " Flag to indicate whether to continue Canary after an exception" )]
7676 [Parameter (ParameterSetName = " default" , Mandatory = $false )]
7777 [Parameter (ParameterSetName = " tenant" , Mandatory = $false )]
7878 [bool ] $ContinueOnFailure = $false ,
@@ -95,7 +95,7 @@ param (
9595 [Parameter (ParameterSetName = " default" , Mandatory = $false )]
9696 [Parameter (ParameterSetName = " tenant" , Mandatory = $false )]
9797 [ValidateNotNullOrEmpty ()]
98- [string ]$CanaryLogFileName
98+ [string ]$CanaryLogFileName = " Canary-Basic- $ ( ( Get-Date ).Ticks ) .log "
9999)
100100
101101# Requires -Modules AzureRM
@@ -118,6 +118,7 @@ $linuxImageOffer = "UbuntuServer"
118118$linuxImageVersion = " 1.0.0"
119119
120120$runCount = 1
121+ $tmpLogname = $CanaryLogFileName
121122while ($runCount -le $NumberOfIterations )
122123{
123124 if (Test-Path - Path $canaryUtilPath )
@@ -128,11 +129,8 @@ while ($runCount -le $NumberOfIterations)
128129
129130 #
130131 # Start Canary
131- #
132- if (-not $CanaryLogFileName )
133- {
134- $CanaryLogFileName = " Canary-Basic-$runCount -$ ( (Get-Date ).Ticks) .log"
135- }
132+ #
133+ $CanaryLogFileName = [IO.Path ]::GetFileNameWithoutExtension($tmpLogname ) + " -$runCount " + [IO.Path ]::GetExtension($tmpLogname )
136134 $CanaryLogFile = $CanaryLogPath + " \$CanaryLogFileName "
137135
138136 Start-Scenario - Name ' Canary' - Type ' Basic' - LogFilename $CanaryLogFile - ContinueOnFailure $ContinueOnFailure
@@ -217,7 +215,7 @@ while ($runCount -le $NumberOfIterations)
217215 $tenantPlanName = " ascantenantplan" + [Random ]::new().Next(1 , 999 )
218216 $tenantOfferName = " ascantenantoffer" + [Random ]::new().Next(1 , 999 )
219217 $tenantSubscriptionName = " ascanarytenantsubscription" + [Random ]::new().Next(1 , 999 )
220- $canaryDefaultTenantSubscription = " canarytenantdefaultsubscription"
218+ $canaryDefaultTenantSubscription = " canarytenantdefaultsubscription" + [ Random ]::new().Next( 1 , 999 )
221219
222220 if (-not $TenantArmEndpoint )
223221 {
0 commit comments