dsccommunity / xPSDesiredStateConfiguration

DSC resources for configuring common operating systems features, files and settings.
https://dsccommunity.org
MIT License
211 stars 135 forks source link

xWindowsProcess: Integration tests fails randomly #420

Closed johlju closed 6 years ago

johlju commented 6 years ago

The integration tests for xWindowsProcess fail to create log file, often, but sometimes the tests passes without a problem.

Context Should start a new testProcess instance as running
      [+] Should not have a logfile already present 83ms
The 'Microsoft.PowerShell.Management' module was not imported because the 'Microsoft.PowerShell.Management' snap-in was already imported.
      [+] Should compile without throwing 490ms
      [+] Should be able to call Get-DscConfiguration without throwing 132ms
      [+] Should return the correct configuration 145ms
      [-] Should create a logfile 76ms
        Expected $true, but got $false.
        105:                 $pathResult | Should Be $true
        at Invoke-LegacyAssertion, C:\Program Files\WindowsPowerShell\Modules\Pester\4.3.1\Functions\Assertions\Should.ps1: line 188
        at <ScriptBlock>, C:\projects\xpsdesiredstateconfiguration\Tests\Integration\MSFT_xWindowsProcess.Integration.Tests.ps1: line 105
johlju commented 6 years ago

The same problem exist in https://github.com/PowerShell/PSDscResources/issues/76.

johlju commented 6 years ago

A potential fix for this was merged in PR #421.