Skip to content

File_Move_Multiple_From_Watched_To_Unwatched_Mac failing occasionally in CI #31455

Closed

Description

@wfurt

https://helix.dot.net/api/2019-06-17/jobs/1b698513-91ff-47b1-84a1-c095c8eeb9b4/workitems/System.IO.FileSystem.Watcher.Tests/files/console.d0c0e6dd.log

System.IO.Tests.File_Move_Tests.File_Move_Multiple_From_Watched_To_Unwatched_Mac(filesCount: 1) [FAIL]
    Expected events (3) count doesn't match triggered events count (1):
    Deleted /var/folders/j1/76_p663903g5g2rg7ckqbv440000gy/T/File_Move_Tests_hepan0n0.4wy/FileMove_Multiple_FromWatchedToUnwatched_192_9877436f/dir_watched/file0 
    Expected: True
    Actual:   False
    Stack Trace:
      /_/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs(558,0): at System.IO.Tests.FileSystemWatcherTest.ExpectEvents(FileSystemWatcher watcher, Int32 expectedEvents, Action action)
      /_/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs(216,0): at System.IO.Tests.File_Move_Tests.FileMove_Multiple_FromWatchedToUnwatched(Int32 filesCount, Boolean skipOldEvents)
      /_/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs(43,0): at System.IO.Tests.File_Move_Tests.File_Move_Multiple_From_Watched_To_Unwatched_Mac(Int32 filesCount)

cloning from discussion in #31383

This test assumes that we will always get incorrect Create event in OSX but that seems to happen only sometimes. We should update test to either wait for Crete events first, ignore them and be able to deal with both cases.

Further more, I did test run on unsupported FreeBSD and I got expected events in different order.

 /usr/home/furt/git/wfurt-corefx/artifacts/bin/System.IO.FileSystem.Watcher.Tests/netcoreapp-FreeBSD-Debug ~/git/wfurt-corefx/src/System.IO.FileSystem.Watcher/tests
    Discovering: System.IO.FileSystem.Watcher.Tests (method display = ClassAndMethod, method display options = None)
    Discovered:  System.IO.FileSystem.Watcher.Tests (found 147 of 183 test cases)
    Starting:    System.IO.FileSystem.Watcher.Tests (parallel test collections = on, max threads = 2)
      System.IO.Tests.File_Move_Tests.File_Move_Multiple_From_Unwatched_To_WatchedMac(filesCount: 3) [FAIL]
        Assert.Equal() Failure
        Expected: SelectArrayIterator<<>f__AnonymousType1<String, String>, FiredEvent> [Created /tmp/File_Move_Tests_jviqx2cg.0d2/FileMove_Multiple_FromUnwatchedToWatched_233_249fe60e/dir_watched/file0 , Created /tmp/File_Move_Tests_jviqx2cg.0d2/FileMove_Multiple_FromUnwatchedToWatched_233_249fe60e/dir_watched/file1 , Created /tmp/File_Move_Tests_jviqx2cg.0d2/FileMove_Multiple_FromUnwatchedToWatched_233_249fe60e/dir_watched/file2 ]
        Actual:   List<FiredEvent> [Created /tmp/File_Move_Tests_jviqx2cg.0d2/FileMove_Multiple_FromUnwatchedToWatched_233_249fe60e/dir_watched/file0 , Created /tmp/File_Move_Tests_jviqx2cg.0d2/FileMove_Multiple_FromUnwatchedToWatched_233_249fe60e/dir_watched/file2 , Created /tmp/File_Move_Tests_jviqx2cg.0d2/FileMove_Multiple_FromUnwatchedToWatched_233_249fe60e/dir_watched/file1 ]
        Stack Trace:
          /usr/home/furt/git/wfurt-corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs(253,0): at System.IO.Tests.File_Move_Tests.FileMove_Multiple_FromUnwatchedToWatched(Int32 filesCount)
          /usr/home/furt/git/wfurt-corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs(62,0): at System.IO.Tests.File_Move_Tests.File_Move_Multiple_From_Unwatched_To_WatchedMac(Int32 filesCount)
    Finished:    System.IO.FileSystem.Watcher.Tests
  === TEST EXECUTION SUMMARY ===
     System.IO.FileSystem.Watcher.Tests  Total: 267, Errors: 0, Failed: 1, Skipped: 0, Time: 3.360s

This may be be product bug or limitation but it is another example where test seems too strict.

cc: @aik-jahoda

Activity

  1. aik-jahoda commented on Nov 11, 2019

    @aik-jahoda
    Contributor

    I'll update the test helper it doesn't assert to fired event count. It is up to the test itself to interprets the events.

  2. self-assigned this
    on Nov 11, 2019
  3. stephentoub commented on Jan 23, 2020

    @stephentoub
    Member

    @aik-jahoda, there's still a test disabled against this issue:

    [Theory]
    [PlatformSpecific(TestPlatforms.OSX)]
    [InlineData(1)]
    [InlineData(2)]
    [InlineData(3)]
    [ActiveIssue("https://github.com/dotnet/corefx/issues/42507", TestPlatforms.OSX)]
    public void Directory_Move_Multiple_From_Watched_To_Unwatched_Mac(int filesCount)

  4. transferred this issue fromdotnet/corefxon Feb 1, 2020
  5. added this to the 5.0 milestone on Feb 1, 2020
  6. removed
    disabled-test
    on Feb 4, 2020
  7. ghost locked as resolved and limited conversation to collaborators on Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-System.IOos-macostest-bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions