@@ -293,69 +293,69 @@ Describe "Install-DBOPackage Oracle tests" -Tag $commandName, IntegrationTests {
293
293
' d' | Should BeIn $testResults.name
294
294
}
295
295
}
296
- Context " testing timeouts" {
297
- BeforeAll {
298
- $content = '
299
- DECLARE
300
- in_time number := 5;
301
- BEGIN
302
- DBMS_LOCK.sleep(in_time);
303
- END;'
304
- $file = Join-PSFPath - Normalize " $workFolder \delay.sql"
305
- $content | Set-Content $file
306
- $null = New-DBOPackage - ScriptPath $file - Name " $workFolder \delay" - Build 1.0 - Force - Configuration @ { ExecutionTimeout = 2 }
307
- }
308
- BeforeEach {
309
- $null = Invoke-DBOQuery @connParams - InputFile $dropObjectsScript
310
- }
311
- AfterAll {
312
- $null = Invoke-DBOQuery @connParams - InputFile $dropObjectsScript
313
- }
314
- It " should throw timeout error " {
315
- { $null = Install-DBOPackage @connParams " $workFolder \delay.zip" - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" } | Should throw ' user requested cancel of current operation'
316
- $output = Get-Content " $workFolder \log.txt" - Raw
317
- $output | Should BeLike " *user requested cancel of current operation*"
318
- $output | Should Not BeLike ' *Upgrade successful*'
319
- }
320
- It " should successfully run within specified timeout" {
321
- $testResults = Install-DBOPackage " $workFolder \delay.zip" @connParams - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" - ExecutionTimeout 6
322
- $testResults.Successful | Should Be $true
323
- $testResults.Scripts.Name | Should Be ' 1.0\delay.sql'
324
- $testResults.SqlInstance | Should Be $script :oracleInstance
325
- $testResults.Database | Should - BeNullOrEmpty
326
- $testResults.SourcePath | Should Be (Join-PSFPath - Normalize " $workFolder \delay.zip" )
327
- $testResults.ConnectionType | Should Be ' Oracle'
328
- $testResults.Configuration.SchemaVersionTable | Should Be $logTable
329
- $testResults.Error | Should BeNullOrEmpty
330
- $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 3000
331
- $testResults.StartTime | Should Not BeNullOrEmpty
332
- $testResults.EndTime | Should Not BeNullOrEmpty
333
- $testResults.EndTime | Should - BeGreaterThan $testResults.StartTime
334
- ' Upgrade successful' | Should BeIn $testResults.DeploymentLog
296
+ # Context "testing timeouts" {
297
+ # BeforeAll {
298
+ # $content = '
299
+ # DECLARE
300
+ # in_time number := 5;
301
+ # BEGIN
302
+ # DBMS_LOCK.sleep(in_time);
303
+ # END;'
304
+ # $file = Join-PSFPath -Normalize "$workFolder\delay.sql"
305
+ # $content | Set-Content $file
306
+ # $null = New-DBOPackage -ScriptPath $file -Name "$workFolder\delay" -Build 1.0 -Force -Configuration @{ ExecutionTimeout = 2 }
307
+ # }
308
+ # BeforeEach {
309
+ # $null = Invoke-DBOQuery @connParams -InputFile $dropObjectsScript
310
+ # }
311
+ # AfterAll {
312
+ # $null = Invoke-DBOQuery @connParams -InputFile $dropObjectsScript
313
+ # }
314
+ # It "should throw timeout error " {
315
+ # { $null = Install-DBOPackage @connParams "$workFolder\delay.zip" -SchemaVersionTable $logTable -OutputFile "$workFolder\log.txt" } | Should throw 'user requested cancel of current operation'
316
+ # $output = Get-Content "$workFolder\log.txt" -Raw
317
+ # $output | Should BeLike "*user requested cancel of current operation*"
318
+ # $output | Should Not BeLike '*Upgrade successful*'
319
+ # }
320
+ # It "should successfully run within specified timeout" {
321
+ # $testResults = Install-DBOPackage "$workFolder\delay.zip" @connParams -SchemaVersionTable $logTable -OutputFile "$workFolder\log.txt" -ExecutionTimeout 6
322
+ # $testResults.Successful | Should Be $true
323
+ # $testResults.Scripts.Name | Should Be '1.0\delay.sql'
324
+ # $testResults.SqlInstance | Should Be $script:oracleInstance
325
+ # $testResults.Database | Should -BeNullOrEmpty
326
+ # $testResults.SourcePath | Should Be (Join-PSFPath -Normalize "$workFolder\delay.zip")
327
+ # $testResults.ConnectionType | Should Be 'Oracle'
328
+ # $testResults.Configuration.SchemaVersionTable | Should Be $logTable
329
+ # $testResults.Error | Should BeNullOrEmpty
330
+ # $testResults.Duration.TotalMilliseconds | Should -BeGreaterThan 3000
331
+ # $testResults.StartTime | Should Not BeNullOrEmpty
332
+ # $testResults.EndTime | Should Not BeNullOrEmpty
333
+ # $testResults.EndTime | Should -BeGreaterThan $testResults.StartTime
334
+ # 'Upgrade successful' | Should BeIn $testResults.DeploymentLog
335
335
336
- $output = Get-Content " $workFolder \log.txt" - Raw
337
- $output | Should Not BeLike " *Unable to read data from the transport connection*"
338
- }
339
- It " should successfully run with infinite timeout" {
340
- $testResults = Install-DBOPackage " $workFolder \delay.zip" @connParams - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" - ExecutionTimeout 0
341
- $testResults.Successful | Should Be $true
342
- $testResults.Scripts.Name | Should Be ' 1.0\delay.sql'
343
- $testResults.SqlInstance | Should Be $script :oracleInstance
344
- $testResults.Database | Should - BeNullOrEmpty
345
- $testResults.SourcePath | Should Be (Join-PSFPath - Normalize " $workFolder \delay.zip" )
346
- $testResults.ConnectionType | Should Be ' Oracle'
347
- $testResults.Configuration.SchemaVersionTable | Should Be $logTable
348
- $testResults.Error | Should BeNullOrEmpty
349
- $testResults.Duration.TotalMilliseconds | Should - BeGreaterOrEqual 0
350
- $testResults.StartTime | Should Not BeNullOrEmpty
351
- $testResults.EndTime | Should Not BeNullOrEmpty
352
- $testResults.EndTime | Should - BeGreaterOrEqual $testResults.StartTime
353
- ' Upgrade successful' | Should BeIn $testResults.DeploymentLog
336
+ # $output = Get-Content "$workFolder\log.txt" -Raw
337
+ # $output | Should Not BeLike "*Unable to read data from the transport connection*"
338
+ # }
339
+ # It "should successfully run with infinite timeout" {
340
+ # $testResults = Install-DBOPackage "$workFolder\delay.zip" @connParams -SchemaVersionTable $logTable -OutputFile "$workFolder\log.txt" -ExecutionTimeout 0
341
+ # $testResults.Successful | Should Be $true
342
+ # $testResults.Scripts.Name | Should Be '1.0\delay.sql'
343
+ # $testResults.SqlInstance | Should Be $script:oracleInstance
344
+ # $testResults.Database | Should -BeNullOrEmpty
345
+ # $testResults.SourcePath | Should Be (Join-PSFPath -Normalize "$workFolder\delay.zip")
346
+ # $testResults.ConnectionType | Should Be 'Oracle'
347
+ # $testResults.Configuration.SchemaVersionTable | Should Be $logTable
348
+ # $testResults.Error | Should BeNullOrEmpty
349
+ # $testResults.Duration.TotalMilliseconds | Should -BeGreaterOrEqual 0
350
+ # $testResults.StartTime | Should Not BeNullOrEmpty
351
+ # $testResults.EndTime | Should Not BeNullOrEmpty
352
+ # $testResults.EndTime | Should -BeGreaterOrEqual $testResults.StartTime
353
+ # 'Upgrade successful' | Should BeIn $testResults.DeploymentLog
354
354
355
- $output = Get-Content " $workFolder \log.txt" - Raw
356
- $output | Should Not BeLike ' *Unable to read data from the transport connection*'
357
- }
358
- }
355
+ # $output = Get-Content "$workFolder\log.txt" -Raw
356
+ # $output | Should Not BeLike '*Unable to read data from the transport connection*'
357
+ # }
358
+ # }
359
359
Context " $commandName whatif tests" {
360
360
BeforeAll {
361
361
$null = New-DBOPackage - ScriptPath $v1scripts - Name $packageNamev1 - Build 1.0
0 commit comments