Skip to content

The TestRunspaceWithPowerShellAndInitialSessionState intermittently fails (about 9%) #8784

@TravisEz13

Description

@TravisEz13

TestRunspaceWithPowerShellAndInitialSessionState intermittently fails.
Last failure is here: https://powershell.visualstudio.com/PowerShell/_build/results?buildId=11461&view=ms.vss-test-web.build-test-results-tab

System.IO.FileNotFoundException : Could not find file '/Users/vsts/agent/2.144.2/work/1/s/test/xUnit/bin/Release/netcoreapp2.1/powershell.config.json'.

Stack trace
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.Management.Automation.Configuration.PowerShellConfig.WaitForFile(String fullPath, FileMode mode, FileAccess access, FileShare share) in /Users/vsts/agent/2.144.2/work/1/s/src/System.Management.Automation/engine/PSConfiguration.cs:line 426
   at System.Management.Automation.Configuration.PowerShellConfig.ReadValueFromFile[T](ConfigScope scope, String key, T defaultValue, Func`4 readImpl) in /Users/vsts/agent/2.144.2/work/1/s/src/System.Management.Automation/engine/PSConfiguration.cs:line 397
   at System.Management.Automation.Configuration.PowerShellConfig.GetPowerShellPolicies(ConfigScope scope) in /Users/vsts/agent/2.144.2/work/1/s/src/System.Management.Automation/engine/PSConfiguration.cs:line 244
   at System.Management.Automation.Utils.GetPolicySettingFromConfigFile[T](ConfigScope[] preferenceOrder) in /Users/vsts/agent/2.144.2/work/1/s/src/System.Management.Automation/engine/Utils.cs:line 525
   at System.Management.Automation.Utils.GetPolicySetting[T](ConfigScope[] preferenceOrder) in /Users/vsts/agent/2.144.2/work/1/s/src/System.Management.Automation/engine/Utils.cs:line 508
   at Microsoft.PowerShell.Commands.ModuleCmdletBase.GetModuleLoggingInformation(IEnumerable`1& moduleNames) in /Users/vsts/agent/2.144.2/work/1/s/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs:line 4496
   at System.Management.Automation.PSSnapInReader.SetSnapInLoggingInformation(PSSnapInInfo psSnapInInfo) in /Users/vsts/agent/2.144.2/work/1/s/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs:line 1081
   at System.Management.Automation.PSSnapInReader.ReadEnginePSSnapIns() in /Users/vsts/agent/2.144.2/work/1/s/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs:line 1068
   at System.Management.Automation.Runspaces.InitialSessionState.CreateDefault() in /Users/vsts/agent/2.144.2/work/1/s/src/System.Management.Automation/engine/InitialSessionState.cs:line 1527
   at PSTests.Parallel.RunspaceTests.TestRunspaceWithPowerShellAndInitialSessionState() in /Users/vsts/agent/2.144.2/work/1/s/test/xUnit/csharp/test_Runspace.cs:line 72

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions