Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
testing: Delay in test causes timeouts in tests that follow it. #11106
4 I expected all tests to pass except for
The above script gave the following results on a sample run, providing preliminary evidence to the presence of cross-contamination of tests.
Test3 created a goroutine that is effective busy looping. This affects the pipeConn function, which also relies on scheduling a newly created goroutine to run before it can return. Because your timeout covers both pipeConn call and the real read loop, after Test3 creates the busy looping goroutine, pipeConn calls in Test4 and Test5 might not be able to return within your timeout. You should tear up the goroutine created during tests even if the test fails. I don't see what we can do to fix the behavior.