Skip to content

Commit

Permalink
Fix a flaky windows test
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Oct 27, 2024
1 parent ae635d3 commit 87159fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/FSNotify/Test/EventTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ eventTests' timeInterval threadingMode poll recursive nested = do
pauseAndRetryOnExpectationFailure timeInterval 3 $ liftIO getEvents >>= \events ->
if | nested && not recursive -> events `shouldBe` []
| isWin && not poll -> case events of
-- On Windows, we sometimes get an extra modified event
[Modified {}, Added {..}] | eventPath `equalFilePath` f && eventIsDirectory == IsFile -> return ()
[Added {..}, Modified {}] | eventPath `equalFilePath` f && eventIsDirectory == IsFile -> return ()
_ -> expectationFailure $ "Got wrong events: " <> show events
| otherwise -> case events of
[Added {..}] | eventPath `equalFilePath` f && eventIsDirectory == IsFile -> return ()
Expand Down

0 comments on commit 87159fd

Please sign in to comment.