Skip to content

Commit 80a34f2

Browse files
authored
add Synapse sparkpool dynamicExecutorAllocation related parameter (#19286)
add test and modify workspace location update test record
1 parent e88ef21 commit 80a34f2

File tree

21 files changed

+4060
-2488
lines changed

21 files changed

+4060
-2488
lines changed

src/Synapse/Synapse.Test/ScenarioTests/Common.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function Get-SqlBlobAuditingTestEnvironmentParameters ($testSuffix)
181181
loginName = "testlogin";
182182
pwd = "testp@ssMakingIt1007Longer";
183183
perfLevel = 'DW200c';
184-
location = "canadacentral";
184+
location = "eastus";
185185
eventHubNamespace = "audit-cmdlet-event-hub-ns" + $testSuffix
186186
logworkspaceName = "audit-cmdlet-logworkspace" +$testSuffix
187187
storageAccountResourceId = "/subscriptions/" + $subscriptionId + "/resourceGroups/" + "audit-cmdlet-test-rg" + $testSuffix + "/providers/Microsoft.Storage/storageAccounts/" + "sqlstorage" + $testSuffix

src/Synapse/Synapse.Test/ScenarioTests/DataClassificationTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function Remove-DataClassificationTestEnvironment ($testSuffix)
205205
.SYNOPSIS
206206
Creates the test environment needed to perform the tests
207207
#>
208-
function Create-SqlDataClassificationTestEnvironment ($testSuffix, $location = "canadacentral")
208+
function Create-SqlDataClassificationTestEnvironment ($testSuffix, $location = "eastus")
209209
{
210210
$params = Get-DataClassificationTestEnvironmentParameters $testSuffix
211211

src/Synapse/Synapse.Test/ScenarioTests/FirewallTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function Get-FirewallRuleTestEnvironmentParameters ($testSuffix)
8787
fileSystemName = "fwcmdletfs" + $testSuffix;
8888
loginName = "testlogin";
8989
pwd = "testp@ssMakingIt1007Longer";
90-
location = "canadacentral";
90+
location = "eastus";
9191
}
9292
}
9393

src/Synapse/Synapse.Test/ScenarioTests/IntegrationRuntimeTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ function Get-WorkspaceTestEnvironmentParameters ($testSuffix)
213213
fileSystemName = "wscmdletfs" + $testSuffix;
214214
loginName = "testlogin";
215215
pwd = "testp@ssMakingIt1007Longer";
216-
location = "canadacentral";
216+
location = "eastus";
217217
}
218218
}
219219

src/Synapse/Synapse.Test/ScenarioTests/SparkPoolTests.ps1

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ function Test-SynapseSparkPool
7676
Assert-NotNull $sparkPoolUpdated.Tags "Tags do not exists"
7777
Assert-NotNull $sparkPoolUpdated.Tags["TestTag"] "The updated tag 'TestTag' does not exist"
7878

79-
# Enable Auto-scale and Auto-pause
80-
$sparkPoolUpdated = Update-AzSynapseSparkPool -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $sparkPoolName -EnableAutoScale $true -AutoScaleMinNodeCount 3 -AutoScaleMaxNodeCount 10 -EnableAutoPause $true -AutoPauseDelayInMinute 15
79+
# Enable Auto-scale and Auto-pause, DynamicExecutorAllocation
80+
$sparkPoolUpdated = Update-AzSynapseSparkPool -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $sparkPoolName -EnableAutoScale $true -AutoScaleMinNodeCount 3 -AutoScaleMaxNodeCount 10 -EnableAutoPause $true -AutoPauseDelayInMinute 15 -EnableDynamicExecutorAllocation $true -MinExecutorCount 1 -MaxExecutorCount 5
8181

8282
Assert-AreEqual $sparkPoolName $sparkPoolUpdated.Name
8383
Assert-AreEqual $location $sparkPoolUpdated.Location
@@ -91,8 +91,12 @@ function Test-SynapseSparkPool
9191
Assert-True {$sparkPoolUpdated.AutoPause.Enabled}
9292
Assert-AreEqual 15 $sparkPoolUpdated.AutoPause.DelayInMinutes
9393

94-
# Disable Auto-scale and Auto-pause
95-
$sparkPoolUpdated = Update-AzSynapseSparkPool -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $sparkPoolName -EnableAutoScale $false -EnableAutoPause $false
94+
Assert-True {$sparkPoolUpdated.DynamicExecutorAllocation.Enabled}
95+
Assert-AreEqual 1 $sparkPoolUpdated.DynamicExecutorAllocation.MinExecutors
96+
Assert-AreEqual 5 $sparkPoolUpdated.DynamicExecutorAllocation.MaxExecutors
97+
98+
# Disable Auto-scale and Auto-pause, DynamicExecutorAllocation
99+
$sparkPoolUpdated = Update-AzSynapseSparkPool -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $sparkPoolName -EnableAutoScale $false -EnableAutoPause $false -EnableDynamicExecutorAllocation $false
96100

97101
Assert-AreEqual $sparkPoolName $sparkPoolUpdated.Name
98102
Assert-AreEqual $location $sparkPoolUpdated.Location
@@ -106,6 +110,8 @@ function Test-SynapseSparkPool
106110
Assert-False {$sparkPoolUpdated.AutoPause.Enabled}
107111
Assert-AreEqual 15 $sparkPoolUpdated.AutoPause.DelayInMinutes
108112

113+
Assert-False {$sparkPoolUpdated.DynamicExecutorAllocation.Enabled}
114+
109115
# List all SparkPools in workspace
110116
[array]$sparkPoolsInWorkspace = Get-AzSynapseSparkPool -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName
111117
Assert-True {$sparkPoolsInWorkspace.Count -ge 1}
@@ -172,7 +178,7 @@ function Get-WorkspaceTestEnvironmentParameters ($testSuffix)
172178
fileSystemName = "wscmdletfs" + $testSuffix;
173179
loginName = "testlogin";
174180
pwd = "testp@ssMakingIt1007Longer";
175-
location = "canadacentral";
181+
location = "eastus";
176182
sparkPoolName = "spool" + $testSuffix;
177183
}
178184
}

src/Synapse/Synapse.Test/ScenarioTests/SqlPoolTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function Get-SqlPoolTestEnvironmentParameters ($testSuffix)
216216
loginName = "testlogin";
217217
pwd = "testp@ssMakingIt1007Longer";
218218
perfLevel = 'DW200c';
219-
location = "canadacentral";
219+
location = "eastus";
220220
tags = @{"NewSqlPoolTag" = "TestTagToNewCommand"}
221221
storageAccountType = "LRS"
222222
}

src/Synapse/Synapse.Test/ScenarioTests/WorkspaceTests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ function Get-WorkspaceEncryptionTestEnvironmentParameters ($testSuffix)
447447
fileSystemName = "wscmdletfs" + $testSuffix;
448448
loginName = "testlogin";
449449
pwd = "testp@ssMakingIt1007Longer";
450-
location = "canadacentral";
450+
location = "eastus";
451451
encryptionKeyIdentifier = "<your-encryptionKeyIdentifier>";
452452
}
453453
}
@@ -516,7 +516,7 @@ function Get-WorkspaceTestEnvironmentParameters ($testSuffix)
516516
fileSystemName = "wscmdletfs" + $testSuffix;
517517
loginName = "testlogin";
518518
pwd = "testp@ssMakingIt1007Longer";
519-
location = "canadacentral";
519+
location = "eastus";
520520
}
521521
}
522522

0 commit comments

Comments
 (0)