Skip to content

Commit

Permalink
Merge pull request #1342 from onflow/alex/reason_for_skipping_test
Browse files Browse the repository at this point in the history
documenting reason for skipping test  `TestConsensus_LeaderForView` (after current epoch)
  • Loading branch information
Alexander Hentschel committed Sep 27, 2021
2 parents 2a21b49 + 76ca57a commit 2ba7bcb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions consensus/hotstuff/committees/consensus_committee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,25 @@ func TestConsensus_LeaderForView(t *testing.T) {

t.Run("after current epoch", func(t *testing.T) {
t.SkipNow()
// REASON FOR SKIPPING TEST:
// We have a temporary fallback to continue with the current consensus committee, if the
// setup for the next epoch failed (aka emergency epoch chain continuation -- EECC).
// This test covers with behaviour _without_ EECC and is therefore skipped.
// The behaviour _with EECC_ is covered by the following test:
// "after current epoch - with emergency epoch chain continuation"
// TODO: for the mature implementation, remove EECC, enable this test, and remove the following test

// get leader for view in next epoch when it is not set up yet
_, err := committee.LeaderForView(250)
assert.Error(t, err)
assert.True(t, errors.Is(err, protocol.ErrNextEpochNotSetup))
})

t.Run("after current epoch - with emergency epoch chain continuation", func(t *testing.T) {
// This test covers the TEMPORARY emergency epoch chain continuation (EECC) fallback
// TODO: for the mature implementation, remove this test,
// enable the previous test "after current epoch"

// get leader for view in next epoch when it is not set up yet
_, err := committee.LeaderForView(250)
// emergency epoch chain continuation should kick in and return a valid leader
Expand Down

0 comments on commit 2ba7bcb

Please sign in to comment.