File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
test/powershell/Modules/Microsoft.PowerShell.Management Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -203,17 +203,16 @@ Describe "Basic FileSystem Provider Tests" -Tags "CI" {
203203
204204 Context " Validate behavior when access is denied" {
205205 BeforeAll {
206+ $powershell = Join-Path $PSHOME " powershell"
206207 if ($IsWindows )
207208 {
208- $powershell = " powershell.exe"
209209 $protectedPath = Join-Path ([environment ]::GetFolderPath(" windows" )) " appcompat" " Programs"
210210 $protectedPath2 = Join-Path $protectedPath " Install"
211211 $newItemPath = Join-Path $protectedPath " foo"
212212 }
213- $errFile = " error.txt"
214- $doneFile = " done.txt"
213+ $errFile = " $testdrive \ error.txt"
214+ $doneFile = " $testdrive \ done.txt"
215215 }
216-
217216 AfterEach {
218217 Remove-Item - Force $errFile - ErrorAction SilentlyContinue
219218 Remove-Item - Force $doneFile - ErrorAction SilentlyContinue
@@ -231,7 +230,7 @@ Describe "Basic FileSystem Provider Tests" -Tags "CI" {
231230
232231 runas.exe / trustlevel:0x20000 " $powershell -nop -c try { $cmdline -ErrorAction Stop } catch { `$ _.FullyQualifiedErrorId | Out-File $errFile }; New-Item -Type File -Path $doneFile "
233232 $startTime = Get-Date
234- while (((Get-Date ) - $startTime ).TotalSeconds -lt 5 -and -not (Test-Path $doneFile ))
233+ while (((Get-Date ) - $startTime ).TotalSeconds -lt 10 -and -not (Test-Path $doneFile ))
235234 {
236235 Start-Sleep - Milliseconds 100
237236 }
You can’t perform that action at this time.
0 commit comments