Skip to content

Commit 9c8b78a

Browse files
committed
add test for reading qcs after bootstrap
1 parent cda715b commit 9c8b78a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

integration/tests/epochs/epoch_join_and_leave_sn_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ type EpochJoinAndLeaveSNSuite struct {
1919
// TestEpochJoinAndLeaveSN should update consensus nodes and assert healthy network conditions
2020
// after the epoch transition completes. See health check function for details.
2121
func (s *EpochJoinAndLeaveSNSuite) TestEpochJoinAndLeaveSN() {
22-
//unittest.SkipUnless(s.T(), unittest.TEST_FLAKY, "fails on CI regularly")
2322
s.runTestEpochJoinAndLeave(flow.RoleConsensus, s.assertNetworkHealthyAfterSNChange)
2423
}

state/protocol/badger/state_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,16 @@ func TestBootstrapNonRoot(t *testing.T) {
280280
bootstrap(t, after, func(state *bprotocol.State, err error) {
281281
require.NoError(t, err)
282282
unittest.AssertSnapshotsEqual(t, after, state.Final())
283+
// should be able to read all QCs
284+
segment, err := state.Final().SealingSegment()
285+
require.NoError(t, err)
286+
for _, block := range segment.Blocks {
287+
snapshot := state.AtBlockID(block.ID())
288+
_, err := snapshot.QuorumCertificate()
289+
require.NoError(t, err)
290+
_, err = snapshot.RandomSource()
291+
require.NoError(t, err)
292+
}
283293
})
284294
})
285295

0 commit comments

Comments
 (0)