mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
fix: disable t.Parallel on TestPortForward (#10449)
I've said it before, I'll say it again: you can't create a timed context before calling `t.Parallel()` and then use it after. Fixes flakes like https://github.com/coder/coder/actions/runs/6716682414/job/18253279157 I've chosen just to drop `t.Parallel()` entirely rather than create a second context after the parallel call, since the vast majority of the test time happens before where the parallel call was. It does all the tailnet setup before `t.Parallel()`. Leaving a call to `t.Parallel()` is a bug risk for future maintainers to come in and use the wrong context in the latter part of the test by accident.
This commit is contained in:
@ -936,10 +936,12 @@ func (c *Conn) Listen(network, addr string) (net.Listener, error) {
|
||||
}
|
||||
|
||||
func (c *Conn) DialContextTCP(ctx context.Context, ipp netip.AddrPort) (*gonet.TCPConn, error) {
|
||||
c.logger.Debug(ctx, "dial tcp", slog.F("addr_port", ipp))
|
||||
return c.netStack.DialContextTCP(ctx, ipp)
|
||||
}
|
||||
|
||||
func (c *Conn) DialContextUDP(ctx context.Context, ipp netip.AddrPort) (*gonet.UDPConn, error) {
|
||||
c.logger.Debug(ctx, "dial udp", slog.F("addr_port", ipp))
|
||||
return c.netStack.DialContextUDP(ctx, ipp)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user