Skip to content

Commit 5d3b8a0

Browse files
bacchanaliaMikolaj
authored andcommitted
PackageTests/NewUpdate: fix skipping flaky tests
RejectFutureIndexStates and UpdateIndexState are marked "skip", but it's under withRemoteRepo, which causes flakiness before skip is called.
1 parent 93f4c0d commit 5d3b8a0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import Test.Cabal.Prelude
22
import Data.List (isPrefixOf)
33

4-
main = cabalTest $ withProjectFile "cabal.project" $ withRemoteRepo "repo" $ do
4+
main = cabalTest $ do
55

66
skip "Flaky test failing in `curl`, see #9530"
77

8+
testBody
9+
10+
testBody = withProjectFile "cabal.project" $ withRemoteRepo "repo" $ do
11+
812
output <- last
913
. words
1014
. head

cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.test.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import Test.Cabal.Prelude
22

3-
main = cabalTest $ withRemoteRepo "repo" $ do
3+
main = cabalTest $ do
44

55
skip "Flaky test failing in `curl`, see #9530"
66

7+
testBody
8+
9+
testBody = withRemoteRepo "repo" $ do
10+
711
-- The _first_ update call causes a warning about missing mirrors, the warning
812
-- is platform-dependent and it's not part of the test expectations, so we
913
-- check the output manually.

0 commit comments

Comments
 (0)