ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Test.Consensus.MiniProtocol.ObjectDiffusion.Smoke

Description

Smoke tests for the object diffusion protocol. This uses a trivial object pool and checks that a few objects can indeed be transferred from the outbound to the inbound peer.

Synopsis

Documentation

newtype ListWithUniqueIds a idTy Source #

Constructors

ListWithUniqueIds [a] 

Instances

Instances details
Show a ⇒ Show (ListWithUniqueIds a idTy) Source # 
Instance details

Defined in Test.Consensus.MiniProtocol.ObjectDiffusion.Smoke

Methods

showsPrecIntListWithUniqueIds a idTy → ShowS #

showListWithUniqueIds a idTy → String #

showList ∷ [ListWithUniqueIds a idTy] → ShowS #

Eq a ⇒ Eq (ListWithUniqueIds a idTy) Source # 
Instance details

Defined in Test.Consensus.MiniProtocol.ObjectDiffusion.Smoke

Methods

(==)ListWithUniqueIds a idTy → ListWithUniqueIds a idTy → Bool #

(/=)ListWithUniqueIds a idTy → ListWithUniqueIds a idTy → Bool #

Ord a ⇒ Ord (ListWithUniqueIds a idTy) Source # 
Instance details

Defined in Test.Consensus.MiniProtocol.ObjectDiffusion.Smoke

Methods

compareListWithUniqueIds a idTy → ListWithUniqueIds a idTy → Ordering #

(<)ListWithUniqueIds a idTy → ListWithUniqueIds a idTy → Bool #

(<=)ListWithUniqueIds a idTy → ListWithUniqueIds a idTy → Bool #

(>)ListWithUniqueIds a idTy → ListWithUniqueIds a idTy → Bool #

(>=)ListWithUniqueIds a idTy → ListWithUniqueIds a idTy → Bool #

maxListWithUniqueIds a idTy → ListWithUniqueIds a idTy → ListWithUniqueIds a idTy #

minListWithUniqueIds a idTy → ListWithUniqueIds a idTy → ListWithUniqueIds a idTy #

mockSystemTime ∷ ∀ (m ∷ TypeType). Applicative m ⇒ SystemTime m Source #

A static SystemTime returning a constant time. The canonical mock system time lives in mockSystemTime, but it is a field of LogicalClock which requires a ResourceRegistry and a background tick thread — too heavyweight for simple property tests that don't need time progression.

prop_smoke_object_diffusion ∷ (Eq object, Show object, Ord objectId, Typeable objectId, Typeable object, NoThunks objectId, Show objectId, NoThunks object) ⇒ ProtocolConstants → [object] → (∀ (m ∷ TypeType). IOLike m ⇒ ObjectDiffusionOutbound objectId object m () → Channel m (AnyMessage (ObjectDiffusion objectId object)) → Tracer m String → m ()) → (∀ (m ∷ TypeType). IOLike m ⇒ ObjectDiffusionInboundPipelined objectId object m () → Channel m (AnyMessage (ObjectDiffusion objectId object)) → Tracer m String → m ()) → (∀ (m ∷ TypeType). IOLike m ⇒ m (ObjectPoolReader objectId object ticketNo m, ObjectPoolWriter objectId object m, m [object])) → Property Source #

genSmokeObjectIdGen SmokeObjectId Source #

genSmokeObjectGen SmokeObject Source #

genListWithUniqueIds ∷ (Ord idTy, WithId a idTy) ⇒ Gen a → Gen (ListWithUniqueIds a idTy) Source #