Skip to content

Commit

Permalink
add test for reading qcs after bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanschalm committed Mar 30, 2023
1 parent cda715b commit 9c8b78a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion integration/tests/epochs/epoch_join_and_leave_sn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ type EpochJoinAndLeaveSNSuite struct {
// TestEpochJoinAndLeaveSN should update consensus nodes and assert healthy network conditions
// after the epoch transition completes. See health check function for details.
func (s *EpochJoinAndLeaveSNSuite) TestEpochJoinAndLeaveSN() {
//unittest.SkipUnless(s.T(), unittest.TEST_FLAKY, "fails on CI regularly")
s.runTestEpochJoinAndLeave(flow.RoleConsensus, s.assertNetworkHealthyAfterSNChange)
}
10 changes: 10 additions & 0 deletions state/protocol/badger/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,16 @@ func TestBootstrapNonRoot(t *testing.T) {
bootstrap(t, after, func(state *bprotocol.State, err error) {
require.NoError(t, err)
unittest.AssertSnapshotsEqual(t, after, state.Final())
// should be able to read all QCs
segment, err := state.Final().SealingSegment()
require.NoError(t, err)
for _, block := range segment.Blocks {
snapshot := state.AtBlockID(block.ID())
_, err := snapshot.QuorumCertificate()
require.NoError(t, err)
_, err = snapshot.RandomSource()
require.NoError(t, err)
}
})
})

Expand Down

0 comments on commit 9c8b78a

Please sign in to comment.