Skip to content

Commit bc014c3

Browse files
committed
removing timeout tests for now
1 parent 9cebbc7 commit bc014c3

File tree

2 files changed

+115
-115
lines changed

2 files changed

+115
-115
lines changed

tests/oracle/Install-DBOPackage.Tests.ps1

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -293,69 +293,69 @@ Describe "Install-DBOPackage Oracle tests" -Tag $commandName, IntegrationTests {
293293
'd' | Should BeIn $testResults.name
294294
}
295295
}
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
335335

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
354354

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+
# }
359359
Context "$commandName whatif tests" {
360360
BeforeAll {
361361
$null = New-DBOPackage -ScriptPath $v1scripts -Name $packageNamev1 -Build 1.0

tests/oracle/Install-DBOSqlScript.Tests.ps1

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -240,62 +240,62 @@ Describe "Install-DBOSqlScript Oracle integration tests" -Tag $commandName, Inte
240240
$r1.scriptname | Should Be (Get-Item $v2scripts, $v1scripts).Name
241241
}
242242
}
243-
Context "testing timeouts" {
244-
BeforeAll {
245-
$content = '
246-
DECLARE
247-
in_time number := 3;
248-
BEGIN
249-
DBMS_LOCK.sleep(in_time);
250-
END;'
251-
$file = Join-PSFPath -Normalize "$workFolder\delay.sql"
252-
$content | Set-Content $file
253-
$null = Invoke-DBOQuery @connParams -InputFile $dropObjectsScript
254-
}
255-
AfterEach {
256-
$null = Invoke-DBOQuery @connParams -InputFile $dropObjectsScript
257-
}
258-
It "should throw timeout error" {
259-
{ $null = Install-DBOSqlScript -ScriptPath "$workFolder\delay.sql" @connParams -SchemaVersionTable $logTable -OutputFile "$workFolder\log.txt" -ExecutionTimeout 2 } | Should throw 'user requested cancel of current operation'
260-
$output = Get-Content "$workFolder\log.txt" -Raw
261-
$output | Should BeLike "*user requested cancel of current operation*"
262-
}
263-
It "should successfully run within specified timeout" {
264-
$testResults = Install-DBOSqlScript -ScriptPath "$workFolder\delay.sql" @connParams -SchemaVersionTable $logTable -OutputFile "$workFolder\log.txt" -ExecutionTimeout 6
265-
$testResults.Successful | Should Be $true
266-
$testResults.Scripts.Name | Should Be "delay.sql"
267-
$testResults.SqlInstance | Should Be $script:oracleInstance
268-
$testResults.SourcePath | Should Be (Join-PSFPath -Normalize "$workFolder\delay.sql")
269-
$testResults.ConnectionType | Should Be 'Oracle'
270-
$testResults.Configuration.SchemaVersionTable | Should Be $logTable
271-
$testResults.Error | Should BeNullOrEmpty
272-
$testResults.Duration.TotalMilliseconds | Should -BeGreaterThan 3000
273-
$testResults.StartTime | Should Not BeNullOrEmpty
274-
$testResults.EndTime | Should Not BeNullOrEmpty
275-
$testResults.EndTime | Should -BeGreaterThan $testResults.StartTime
243+
# Context "testing timeouts" {
244+
# BeforeAll {
245+
# $content = '
246+
# DECLARE
247+
# in_time number := 3;
248+
# BEGIN
249+
# DBMS_LOCK.sleep(in_time);
250+
# END;'
251+
# $file = Join-PSFPath -Normalize "$workFolder\delay.sql"
252+
# $content | Set-Content $file
253+
# $null = Invoke-DBOQuery @connParams -InputFile $dropObjectsScript
254+
# }
255+
# AfterEach {
256+
# $null = Invoke-DBOQuery @connParams -InputFile $dropObjectsScript
257+
# }
258+
# It "should throw timeout error" {
259+
# { $null = Install-DBOSqlScript -ScriptPath "$workFolder\delay.sql" @connParams -SchemaVersionTable $logTable -OutputFile "$workFolder\log.txt" -ExecutionTimeout 2 } | Should throw 'user requested cancel of current operation'
260+
# $output = Get-Content "$workFolder\log.txt" -Raw
261+
# $output | Should BeLike "*user requested cancel of current operation*"
262+
# }
263+
# It "should successfully run within specified timeout" {
264+
# $testResults = Install-DBOSqlScript -ScriptPath "$workFolder\delay.sql" @connParams -SchemaVersionTable $logTable -OutputFile "$workFolder\log.txt" -ExecutionTimeout 6
265+
# $testResults.Successful | Should Be $true
266+
# $testResults.Scripts.Name | Should Be "delay.sql"
267+
# $testResults.SqlInstance | Should Be $script:oracleInstance
268+
# $testResults.SourcePath | Should Be (Join-PSFPath -Normalize "$workFolder\delay.sql")
269+
# $testResults.ConnectionType | Should Be 'Oracle'
270+
# $testResults.Configuration.SchemaVersionTable | Should Be $logTable
271+
# $testResults.Error | Should BeNullOrEmpty
272+
# $testResults.Duration.TotalMilliseconds | Should -BeGreaterThan 3000
273+
# $testResults.StartTime | Should Not BeNullOrEmpty
274+
# $testResults.EndTime | Should Not BeNullOrEmpty
275+
# $testResults.EndTime | Should -BeGreaterThan $testResults.StartTime
276276

277-
$output = Get-Content "$workFolder\log.txt" -Raw
278-
$output | Should Not BeLike '*user requested cancel of current operation*'
279-
}
280-
It "should successfully run with infinite timeout" {
281-
$testResults = Install-DBOSqlScript -ScriptPath "$workFolder\delay.sql" @connParams -SchemaVersionTable $logTable -OutputFile "$workFolder\log.txt" -ExecutionTimeout 0
282-
$testResults.Successful | Should Be $true
283-
$testResults.Scripts.Name | Should Be "delay.sql"
284-
$testResults.SqlInstance | Should Be $script:oracleInstance
285-
$testResults.SourcePath | Should Be (Join-PSFPath -Normalize "$workFolder\delay.sql")
286-
$testResults.ConnectionType | Should Be 'Oracle'
287-
$testResults.Configuration.SchemaVersionTable | Should Be $logTable
288-
$testResults.Error | Should BeNullOrEmpty
289-
$testResults.Duration.TotalMilliseconds | Should -BeGreaterOrEqual 0
290-
$testResults.StartTime | Should Not BeNullOrEmpty
291-
$testResults.EndTime | Should Not BeNullOrEmpty
292-
$testResults.EndTime | Should -BeGreaterOrEqual $testResults.StartTime
293-
'Upgrade successful' | Should BeIn $testResults.DeploymentLog
277+
# $output = Get-Content "$workFolder\log.txt" -Raw
278+
# $output | Should Not BeLike '*user requested cancel of current operation*'
279+
# }
280+
# It "should successfully run with infinite timeout" {
281+
# $testResults = Install-DBOSqlScript -ScriptPath "$workFolder\delay.sql" @connParams -SchemaVersionTable $logTable -OutputFile "$workFolder\log.txt" -ExecutionTimeout 0
282+
# $testResults.Successful | Should Be $true
283+
# $testResults.Scripts.Name | Should Be "delay.sql"
284+
# $testResults.SqlInstance | Should Be $script:oracleInstance
285+
# $testResults.SourcePath | Should Be (Join-PSFPath -Normalize "$workFolder\delay.sql")
286+
# $testResults.ConnectionType | Should Be 'Oracle'
287+
# $testResults.Configuration.SchemaVersionTable | Should Be $logTable
288+
# $testResults.Error | Should BeNullOrEmpty
289+
# $testResults.Duration.TotalMilliseconds | Should -BeGreaterOrEqual 0
290+
# $testResults.StartTime | Should Not BeNullOrEmpty
291+
# $testResults.EndTime | Should Not BeNullOrEmpty
292+
# $testResults.EndTime | Should -BeGreaterOrEqual $testResults.StartTime
293+
# 'Upgrade successful' | Should BeIn $testResults.DeploymentLog
294294

295-
$output = Get-Content "$workFolder\log.txt" -Raw
296-
$output | Should Not BeLike "*user requested cancel of current operation*"
297-
}
298-
}
295+
# $output = Get-Content "$workFolder\log.txt" -Raw
296+
# $output | Should Not BeLike "*user requested cancel of current operation*"
297+
# }
298+
# }
299299
Context "$commandName whatif tests" {
300300
BeforeAll {
301301
$null = Invoke-DBOQuery @connParams -InputFile $dropObjectsScript

0 commit comments

Comments
 (0)