Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documenting reason for skipping test TestConsensus_LeaderForView (after current epoch) #1342

Merged
merged 3 commits into from
Sep 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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