From 1311a1b0e24cb6f9bae50f9a636dcb28deb7b802 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Mon, 19 Jul 2021 00:05:42 -0400 Subject: [PATCH] remove clist clear test to accomadate clear method rollback --- internal/libs/clist/clist_test.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/internal/libs/clist/clist_test.go b/internal/libs/clist/clist_test.go index 681904b10..0c0a7a86e 100644 --- a/internal/libs/clist/clist_test.go +++ b/internal/libs/clist/clist_test.go @@ -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") - } - }) }