Skip to content

Commit a798019

Browse files
committed
add comments explaining the rationale behind hardcoded rotated after values
1 parent b3133bd commit a798019

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hydra-node/test/Hydra/Events/RotationSpec.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ spec = parallel $ do
3737
let initialChainState = SimpleChainState{slot = ChainSlot 0}
3838
let checkpointer = mkChechpointer initialChainState now
3939
let logId = 0
40+
-- XXX: this is hardcoded to ensure we get a checkpoint + a single event at the end
4041
let rotationConfig = RotateAfter 4
4142
eventStore <- createMockSourceSink
4243
rotatingEventStore <- newRotatedEventStore rotationConfig checkpointer logId eventStore
@@ -52,7 +53,8 @@ spec = parallel $ do
5253
let initialChainState = SimpleChainState{slot = ChainSlot 0}
5354
let checkpointer = mkChechpointer initialChainState now
5455
let logId = 0
55-
let rotationConfig = RotateAfter 4
56+
-- XXX: this is hardcoded to ensure we get a single checkpoint event at the end
57+
let rotationConfig = RotateAfter 3
5658
eventStore <- createMockSourceSink
5759
rotatingEventStore <- newRotatedEventStore rotationConfig checkpointer logId eventStore
5860
testHydrate rotatingEventStore []

0 commit comments

Comments
 (0)