From 9d4873f8d411d337f9b3ed01ca11f090a91ac599 Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 3 Jun 2026 15:18:10 -0400 Subject: [PATCH] test: NoticeHandler malformed ignored --- notice_test.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/notice_test.go b/notice_test.go index cf676af..4e7d426 100644 --- a/notice_test.go +++ b/notice_test.go @@ -31,9 +31,20 @@ func TestNoticeHandler(t *testing.T) { }) t.Run("malformed ignored", func(t *testing.T) { - // p.receive([]byte("not json")) - // Never: nothing readable from h.Notices() within NegativeTestTimeout - // assert no panic + p, envoy := newMockEnvoy(t) + h := NewNoticeHandler(envoy) + t.Cleanup(h.Close) + + p.receive([]byte("not json")) + + Never(t, func() bool { + select { + case <-h.Notices(): + return true + default: + return false + } + }, "notices channel should remain empty") }) t.Run("observer notified", func(t *testing.T) {