Skip to content

Commit

Permalink
PackageTests/NewUpdate: fix skipping flaky tests
Browse files Browse the repository at this point in the history
RejectFutureIndexStates and UpdateIndexState are marked "skip", but it's
under withRemoteRepo, which causes flakiness before skip is called.
  • Loading branch information
bacchanalia committed May 23, 2024
1 parent f9e242f commit e2b2a8a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Test.Cabal.Prelude
import Data.List (isPrefixOf)

main = cabalTest $ withProjectFile "cabal.project" $ withRemoteRepo "repo" $ do
main = cabalTest $ do

skip "Flaky test failing in `curl`, see #9530"
skipIf "Flaky test failing in `curl` on OSX, see #9530" =<< isOSX

testBody

testBody = withProjectFile "cabal.project" $ withRemoteRepo "repo" $ do

output <- last
. words
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import Test.Cabal.Prelude

main = cabalTest $ withRemoteRepo "repo" $ do
main = cabalTest $ do

skip "Flaky test failing in `curl`, see #9530"
skipIf "Flaky test failing in `curl` on OSX, see #9530" =<< isOSX

testBody

testBody = withRemoteRepo "repo" $ do

-- The _first_ update call causes a warning about missing mirrors, the warning
-- is platform-dependent and it's not part of the test expectations, so we
Expand Down

0 comments on commit e2b2a8a

Please sign in to comment.