diff --git a/leadership/candidate_test.go b/leadership/candidate_test.go index eaa4551524..bd63fcf353 100644 --- a/leadership/candidate_test.go +++ b/leadership/candidate_test.go @@ -27,7 +27,6 @@ func TestCandidate(t *testing.T) { electedCh := candidate.ElectedCh() // Should issue a false upon start, no matter what. - assert.False(t, candidate.IsLeader()) assert.False(t, <-electedCh) // Since the lock always succeeeds, we should get elected. diff --git a/leadership/follower_test.go b/leadership/follower_test.go index 52364e0b1d..943162ae77 100644 --- a/leadership/follower_test.go +++ b/leadership/follower_test.go @@ -32,9 +32,9 @@ func TestFollower(t *testing.T) { // We shouldn't see duplicate events. assert.Equal(t, <-leaderCh, "leader1") - assert.Equal(t, follower.Leader(), "leader1") assert.Equal(t, <-leaderCh, "leader2") assert.Equal(t, <-leaderCh, "leader1") + assert.Equal(t, follower.Leader(), "leader1") // Once stopped, iteration over the leader channel should stop. follower.Stop()