Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build/scripts/ImportTestDataInBcContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ function Restore-TenantDatabaseForDemoDataRetry {
[string]$BackupFile
)

# Restart the container to drop lingering connections to 'default' so the restore can obtain exclusive access.
Write-Host "Restarting container to release lingering database connections before restoring snapshot..."
Restart-BcContainer -containerName $ContainerName
Wait-ForTenantReady -ContainerName $ContainerName

Write-Host "Restoring tenant database from snapshot before retrying demo data generation..."
Invoke-ScriptInBcContainer -containerName $ContainerName -scriptblock {
Stop-NAVServerInstance -ServerInstance $ServerInstance
Expand Down
Loading