From 9a7936d2cacf2fb1cb16bf71089ec23c050c6dcd Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Oct 2025 17:47:19 +0200 Subject: [PATCH] fix flaky TestConnectionUnpackFailureDropped (#5382) * Initial plan * Fix flaky TestConnectionUnpackFailureDropped by adding synctest.Wait Co-authored-by: marten-seemann <1478487+marten-seemann@users.noreply.github.com> * formatting --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: marten-seemann <1478487+marten-seemann@users.noreply.github.com> Co-authored-by: Marten Seemann --- connection_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/connection_test.go b/connection_test.go index 2dc0b1087..4bc977a8d 100644 --- a/connection_test.go +++ b/connection_test.go @@ -862,6 +862,9 @@ func testConnectionUnpackFailureDropped(t *testing.T, unpackErr error, packetDro // test teardown tc.connRunner.EXPECT().Remove(gomock.Any()).AnyTimes() tc.conn.destroy(nil) + + synctest.Wait() + select { case <-errChan: default: