File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ Describe "<type> Install-DBOPackage integration tests" -Tag FunctionalTests -For
212212 $testResults.Scripts.Name | Should - Be ' 1.0\delay.sql'
213213 $testResults.SourcePath | Should - Be (Join-PSFPath - Normalize " $workFolder \delay.zip" )
214214 $testResults.Error | Should - BeNullOrEmpty
215- $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 3000
215+ $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 2500
216216
217217 $output = Get-Content " $workFolder \log.txt" - Raw
218218 $output | Should -Not - BeLike $timeoutError
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ Describe "<type> Install-DBOScript integration tests" -Tag FunctionalTests -ForE
127127 $testResults.Scripts.Name | Should - Be (Get-Item $delayScript ).Name
128128 $testResults.SourcePath | Should - Be (Resolve-Path $delayScript ).Path
129129 $testResults.Error | Should - BeNullOrEmpty
130- $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 3000
130+ $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 2500
131131 $output = Get-Content $outputFile - Raw
132132 $output | Should -Not - BeLike $timeoutError
133133 $output | Should - BeLike ' *Successful!*'
@@ -138,7 +138,7 @@ Describe "<type> Install-DBOScript integration tests" -Tag FunctionalTests -ForE
138138 $testResults.Scripts.Name | Should - Be (Get-Item $delayScript ).Name
139139 $testResults.SourcePath | Should - Be (Resolve-Path $delayScript ).Path
140140 $testResults.Error | Should - BeNullOrEmpty
141- $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 3000
141+ $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 2500
142142 $output = Get-Content $outputFile - Raw
143143 $output | Should -Not - BeLike $timeoutError
144144 $output | Should - BeLike ' *Successful!*'
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ Describe "<type> Invoke-Deployment integration tests" -Tag FunctionalTests -ForE
128128 $testResults.Scripts.Name | Should - Be (Get-Item $delayScript ).Name
129129 $testResults.SourcePath | Should - Be (Resolve-Path $delayScript ).Path
130130 $testResults.Error | Should - BeNullOrEmpty
131- $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 3000
131+ $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 2500
132132 $output = Get-Content $outputFile - Raw
133133 $output | Should -Not - BeLike $timeoutError
134134 $output | Should - BeLike ' *Successful!*'
@@ -140,7 +140,7 @@ Describe "<type> Invoke-Deployment integration tests" -Tag FunctionalTests -ForE
140140 $testResults.Scripts.Name | Should - Be (Get-Item $delayScript ).Name
141141 $testResults.SourcePath | Should - Be (Resolve-Path $delayScript ).Path
142142 $testResults.Error | Should - BeNullOrEmpty
143- $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 3000
143+ $testResults.Duration.TotalMilliseconds | Should - BeGreaterThan 2500
144144 $output = Get-Content $outputFile - Raw
145145 $output | Should -Not - BeLike $timeoutError
146146 $output | Should - BeLike ' *Successful!*'
Original file line number Diff line number Diff line change @@ -159,6 +159,8 @@ CREATE TABLE "$logtable"
159159 GRANT CONNECT, RESOURCE, CREATE ANY TABLE TO $dbUserName /
160160 GRANT EXECUTE on dbms_lock to $dbUserName "
161161 $dropDatabaseScript = "
162+ DECLARE
163+ sescount int;
162164 BEGIN
163165 FOR x IN ( SELECT count(*) cnt
164166 FROM DUAL
@@ -171,6 +173,11 @@ CREATE TABLE "$logtable"
171173 LOOP
172174 EXECUTE IMMEDIATE ('ALTER SYSTEM DISCONNECT SESSION ''' || ln_cur.sid || ',' || ln_cur.serial# || ''' IMMEDIATE');
173175 END LOOP;
176+ LOOP
177+ SELECT COUNT(*) INTO sescount FROM v`$ session WHERE username = '$dbUserName ';
178+ EXIT WHEN sescount = 0;
179+ DBMS_LOCK.sleep(0.1);
180+ END LOOP;
174181 EXECUTE IMMEDIATE 'DROP USER $dbUserName CASCADE';
175182 END IF;
176183 END LOOP;
You can’t perform that action at this time.
0 commit comments