Skip to content

Basic filesystem tests fail intermittently #4561

Closed

Description

Example:
https://ci.appveyor.com/project/PowerShell/powershell/build/6.0.0-beta.5-4620/tests

Basic FileSystem Provider Tests.Validate behavior when access is denied.Access-denied test for 'Move-Item -Path C:\Windows\appcompat\Programs -Destination bar
Pester 442 ms
Error message:
Expected string length 70 but was 65. Strings differ at index 0.
Expected: {MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand}
But was:  {RenameItemIOError,Microsoft.PowerShell.Commands.RenameItemCommand}
-----------^
Error stack trace:
at line: 241 in C:\projects\powershell\test\powershell\Modules\Microsoft.PowerShell.Management\FileSystem.Tests.ps1
241:             $err | Should Be $expectedError

Activity

  1. added
    WG-Quality-Test
    Issue-Bug
    on Aug 13, 2017
  2. dantraMSFT commented on Sep 8, 2017

    @dantraMSFT
    Contributor

    Leave a comment

  3. dantraMSFT commented on Sep 8, 2017

    @dantraMSFT
    Contributor

    We're still seeing intermittent failures in the access denied tests due to PowerShell running longer than 10 seconds. When this occurs, the remaining tests in the context can fail due to the previous PowerShell instance completing after the next test starts (i.e., the $donefile and $errFile from test 1 are not created until test 2 starts, defeating the AfterEach cleanup and the wait logic in the subsequent test.

    The fix should address this by using a unique done and error file as well as increasing the timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugResolution-FixedWG-Quality-Test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions