Skip to content

FileSystemWatcher tests on MacOS constantly fail on Outerloop CI run #31383

Closed
dotnet/corefx
#42430

Activity

  1. davidsh commented on Nov 4, 2019

    @davidsh
    ContributorAuthor

    I plan to disable these tests so that we can have GREEN for CI in Outerloop

  2. changed the title [-]FileWatcher tests on MacOS constantly fail on Outerloop CI run[/-] [+]FileSystemWatcher tests on MacOS constantly fail on Outerloop CI run[/+] on Nov 4, 2019
  3. danmoseley commented on Nov 4, 2019

    @danmoseley
    Contributor
  4. davidsh commented on Nov 4, 2019

    @davidsh
    ContributorAuthor

    @wfurt

    dotnet/corefx#40543 didn't fix everything. And these specific tests are always failing Outerloop MacOS CI run making outerloop red and not green. So I will disable these tests against this issue.

  5. wfurt commented on Nov 4, 2019

    @wfurt
    Member

    dotnet/corefx#40543 only touched Linux implementation. dotnet/corefx#41963 may help. I was planning to look at them but I got distracted with 3.1 investigation.

  6. aik-jahoda commented on Nov 4, 2019

    @aik-jahoda
    Contributor

    dotnet/corefx#41963 doesn't fix this outer loop test

  7. davidsh commented on Nov 4, 2019

    @davidsh
    ContributorAuthor

    #40543 only touched Linux implementation. dotnet/corefx#41963 may help. I was planning to look at them but I got distracted with 3.1 investigation.

    #41963 doesn't fix this outer loop test

    Thanks! I understand those fixes probably didn't help with this issue. But it's important that we get test failures either fixed or tests disabled so that CI gets to GREEN.

    That's why I disabled the tests now. Then later, when someone has the time, they can investigate the failures. But at least CI will be improved for the team since people have to always spend time chasing after RED failures.

  8. wfurt commented on Nov 4, 2019

    @wfurt
    Member

    yes, I agree. I will setup run in loop and I'll investigate as time permit. One thing we discovered with @aik-jahoda is that you can get events from before you subscribed. I don't know if that is root cause but that behavior is specific to MacOS and we did not find way how to avoid it.

  9. danmoseley commented on Nov 4, 2019

    @danmoseley
    Contributor

    I linked dotnet/corefx#40543 merely because I remembered it touched the same test.

  10. wfurt commented on Nov 5, 2019

    @wfurt
    Member

    It seems like dotnet/corefx#41963 made it worse. I get failures now when running tests locally.
    I will take look.

       Starting:    System.IO.FileSystem.Watcher.Tests (parallel test collections = on, max threads = 8)
          System.IO.Tests.File_Move_Tests.File_Move_Multiple_From_Watched_To_Unwatched_Mac(filesCount: 2) [FAIL]
            Expected events (6) count doesn't match triggered events count (2):
            Deleted /var/folders/z6/nnqqzwmd6lz3dttlnjp_vgp00000gn/T/File_Move_Tests_wdzydv2y.l0y/FileMove_Multiple_FromWatchedToUnwatched_192_9a4207af/dir_watched/file0
            Deleted /var/folders/z6/nnqqzwmd6lz3dttlnjp_vgp00000gn/T/File_Move_Tests_wdzydv2y.l0y/FileMove_Multiple_FromWatchedToUnwatched_192_9a4207af/dir_watched/file1
            Expected: True
            Actual:   False
            Stack Trace:
              /Users/furt/github/wfurt-corefx-watcher/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs(558,0): at System.IO.Tests.FileSystemWatcherTest.ExpectEvents(FileSystemWatcher watcher, Int32 expectedEvents, Action action)
    
  11. aik-jahoda commented on Nov 5, 2019

    @aik-jahoda
    Contributor

    the File_Move_Multiple_From_Watched_To_Unwatched_Mac expect FSEventStream receive old event however it seems it somehow behaves randomly as the error indicates FSEventStream received new events only.

    I tried to sync the filesystem however it doesn't affect the FSEventStream at all.

    File_Move_Multiple_From_Watched_To_Unwatched_Mac is not part of the outer loop tests.

    Removing this line will make the test race condition agnostic: https://github.com/dotnet/corefx/blob/a1f8c919ac1280bb235264d5cc81f23b0d117710/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs#L558

  12. wfurt commented on Nov 5, 2019

    @wfurt
    Member

    It seems like System.IO.Tests.FileSystemWatcher_Multiple_Test.FileSystemWatcher_File_Rename_NotAffectEachOther is regression caused by dotnet/corefx#40611. I did not see Outerloop executed on that PR but the run is old. It fails ever since and it is sad we did not notice for such a long time.
    We now get Rename event instead of getting Create and Delete.
    cc: @carlossanlop @JeremyKuhne @mandawah

    As far as File_Move_Multiple_From_Watched_To_Unwatched_Mac it seems like the test assume that we will get events prior to Watcher creation. But in reality we may get them. The coalescing of events depend on timer and perhaps other activities. So we have race condition with system load and perhaps external activities.

  13. JeremyKuhne commented on Nov 5, 2019

    @JeremyKuhne
    Member

    As far as the change in events I believe it was this discussion: dotnet/corefx#40611 (comment)

  14. wfurt commented on Nov 5, 2019

    @wfurt
    Member

    I think that if fine - what ever we agreed to. But it is easy for external contributors to miss Outerloop @JeremyKuhne and we should notice failing tests IMHO.

  15. JeremyKuhne commented on Nov 5, 2019

    @JeremyKuhne
    Member

    we should notice failing tests IMHO.

    Absolutely, just pointing out that the behavior change was expected. :)

  16. self-assigned this
    on Nov 7, 2019
  17. stephentoub commented on Nov 8, 2019

    @stephentoub
    Member

    Failed again here:
    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)
    

    Please disable the test while it's investigated. Thanks.

  18. transferred this issue fromdotnet/corefxon Feb 1, 2020
  19. added this to the 5.0 milestone on Feb 1, 2020
  20. removed
    disabled-test
    on Feb 4, 2020
  21. 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

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions