Skip to content

Commit

Permalink
Order p2p governor tests after the livelock test
Browse files Browse the repository at this point in the history
The no livelock property is needed to ensure other tests terminate. Or
to put it another way, other tests are simpler to write by assuming that
the livelock property passes.
  • Loading branch information
dcoutts authored and coot committed Jun 15, 2021
1 parent d84c4eb commit 1597cac
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions ouroboros-network/test/Test/Ouroboros/Network/PeerSelection.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import Test.Ouroboros.Network.PeerSelection.PeerGraph

import Test.QuickCheck
import Test.QuickCheck.Signal
import Test.Tasty (TestTree, testGroup)
import Test.Tasty (TestTree, testGroup, after, DependencyType(..))
import Test.Tasty.QuickCheck (testProperty)


Expand All @@ -61,15 +61,23 @@ tests =
testGroup "Ouroboros.Network.PeerSelection"
[ Test.Ouroboros.Network.PeerSelection.LocalRootPeers.tests
, Test.Ouroboros.Network.PeerSelection.MockEnvironment.tests
, testGroup "safety"
, testGroup "basic"
[ testProperty "has output" prop_governor_hasoutput
, testProperty "no failure" prop_governor_nofail
, testProperty "no livelock" prop_governor_nolivelock
, testProperty "no excess busyness" prop_governor_nobusyness
]

-- The no livelock property is needed to ensure other tests terminate
, after AllSucceed "Ouroboros.Network.PeerSelection.basic" $
testGroup "safety"
[ testProperty "no excess busyness" prop_governor_nobusyness
, testProperty "event coverage" prop_governor_trace_coverage
, testProperty "connection status" prop_governor_connstatus
]
, testGroup "progress"

-- The no livelock property is needed to ensure other tests terminate
, after AllSucceed "Ouroboros.Network.PeerSelection.basic" $
testGroup "progress"
[ testProperty "gossip reachable" prop_governor_gossip_1hr

-- , testProperty "progresses towards public root peers target (from below)"
Expand Down

0 comments on commit 1597cac

Please sign in to comment.