mirror of
https://github.com/docker/docs.git
synced 2026-04-12 14:25:46 +07:00
Merge pull request #944 from aluzzardi/leadership-test-fix
Leadership: Remove flaky test.
This commit is contained in:
@@ -46,14 +46,7 @@ func TestCandidate(t *testing.T) {
|
||||
assert.False(t, <-electedCh)
|
||||
assert.True(t, <-electedCh)
|
||||
|
||||
// After stopping the candidate, the ElectedCh should be closed.
|
||||
candidate.Stop()
|
||||
select {
|
||||
case <-electedCh:
|
||||
assert.True(t, false) // we should not get here.
|
||||
default:
|
||||
assert.True(t, true)
|
||||
}
|
||||
|
||||
mockStore.AssertExpectations(t)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user