cleanup: flakey tests and race conditions

This commit is contained in:
Jay
2026-06-04 12:07:03 -04:00
parent b5b0ec77ba
commit dda3bfd5b7
4 changed files with 15 additions and 8 deletions
+3 -1
View File
@@ -364,7 +364,9 @@ func TestEventPublisher(t *testing.T) {
}, "Publish did not return a send error")
assert.ErrorContains(t, err, "send failed")
assert.Len(t, EventsOf[PublishSendFailed](obs), 1)
// on connect event handler may race with Publish()
assert.GreaterOrEqual(t, len(EventsOf[PublishSendFailed](obs)), 1)
})
t.Run("disconnect then send failure on reconnect", func(t *testing.T) {