From 643cd64f5e0fa03e77f0cfe1fd42698ef45fa9fd Mon Sep 17 00:00:00 2001 From: Zoe Zuser Date: Sun, 19 May 2024 19:28:47 -0400 Subject: [PATCH] PackageTests/NewUpdate: fix skipping flaky tests RejectFutureIndexStates and UpdateIndexState are marked "skip", but it's under withRemoteRepo, which causes flakiness before skip is called. --- .../NewUpdate/RejectFutureIndexStates/cabal.test.hs | 6 +++++- .../NewUpdate/UpdateIndexState/update-index-state.test.hs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs b/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs index 8d22aed3494..475a093360d 100644 --- a/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs @@ -1,10 +1,14 @@ 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" + testBody + +testBody = withProjectFile "cabal.project" $ withRemoteRepo "repo" $ do + output <- last . words . head diff --git a/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.test.hs b/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.test.hs index 24b1e7b5dd6..e6485d51f71 100644 --- a/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.test.hs +++ b/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.test.hs @@ -1,9 +1,13 @@ import Test.Cabal.Prelude -main = cabalTest $ withRemoteRepo "repo" $ do +main = cabalTest $ do skip "Flaky test failing in `curl`, see #9530" + 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 -- check the output manually.