Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@uzairnawaz
Copy link

Solves #5940

Existing tcp e2e tests use a time.Sleep call to guarantee that all spawned goroutines get cleaned up before running a leak check. This PR instead uses synctest.Test on each testcase with a synctest.Wait() call to guarantee that test case goroutines don't exit until all child goroutines are cleaned up.

This was done with the following script: https://gist.github.com/uzairnawaz/d8a891c2a8072690e180a1027c69f90f

@tamird
Copy link
Contributor

tamird commented Jan 5, 2026

Did you run all the tests? Do they pass?

@tamird
Copy link
Contributor

tamird commented Jan 8, 2026

The update to Go 1.25 has landed, so this should be clear to proceed, provided it is ready for review.

// enabled.
func TestSackPermittedConnect(t *testing.T) {
for _, sackEnabled := range []bool{false, true} {
sackEnabled := sackEnabled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of thing is not needed since Go1.22

https://go.dev/blog/loopvar-preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants