mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-21 06:36:19 +00:00
remove clist clear test to accomadate clear method rollback
This commit is contained in:
@@ -340,14 +340,9 @@ func TestRemoved(t *testing.T) {
|
||||
l := New()
|
||||
el1 := l.PushBack(1)
|
||||
el2 := l.PushBack(2)
|
||||
el3 := l.PushBack(2)
|
||||
l.Remove(el1)
|
||||
require.True(t, el1.Removed())
|
||||
require.False(t, el2.Removed())
|
||||
|
||||
l.Clear()
|
||||
require.True(t, el2.Removed())
|
||||
require.True(t, el3.Removed())
|
||||
}
|
||||
|
||||
func TestNextWaitChan(t *testing.T) {
|
||||
@@ -386,20 +381,4 @@ func TestNextWaitChan(t *testing.T) {
|
||||
t.Fatal("nextWaitChan should have been closed")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("clearing list should close elements' nextWaitChan", func(t *testing.T) {
|
||||
el3 := l.PushBack(3)
|
||||
select {
|
||||
case <-el3.NextWaitChan():
|
||||
t.Fatal("nextWaitChan should not have been closed")
|
||||
default:
|
||||
}
|
||||
l.Clear()
|
||||
select {
|
||||
case <-el3.NextWaitChan():
|
||||
require.Nil(t, el2.Next())
|
||||
default:
|
||||
t.Fatal("nextWaitChan should have been closed")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user