consul/agent/grpc
Daniel Nephin e8312d6b5a testing: remove unnecessary calls to freeport
Previously we believe it was necessary for all code that required ports
to use freeport to prevent conflicts.

https://github.com/dnephin/freeport-test shows that it is actually save
to use port 0 (`127.0.0.1:0`) as long as it is passed directly to
`net.Listen`, and the listener holds the port for as long as it is
needed.

This works because freeport explicitly avoids the ephemeral port range,
and port 0 always uses that range. As you can see from the test output
of https://github.com/dnephin/freeport-test, the two systems never use
overlapping ports.

This commit converts all uses of freeport that were being passed
directly to a net.Listen to use port 0 instead. This allows us to remove
a bit of wrapping we had around httptest, in a couple places.
2021-11-29 12:19:43 -05:00
..
internal/testservice deps: upgrade gogo-protobuf to v1.3.2 (#10813) 2021-08-12 14:05:46 -04:00
resolver grpc: ensure that streaming gRPC requests work over mesh gateway based wan federation (#10838) 2021-08-24 16:28:44 -05:00
client.go grpc: ensure that streaming gRPC requests work over mesh gateway based wan federation (#10838) 2021-08-24 16:28:44 -05:00
client_test.go testing: remove unnecessary calls to freeport 2021-11-29 12:19:43 -05:00
handler.go Set gRPC keepalives to mirror Yamux keepalive behaviour 2021-04-07 14:09:22 +01:00
server_test.go testing: remove unnecessary calls to freeport 2021-11-29 12:19:43 -05:00
stats.go fix 64-bit aligment for 32-bit platforms 2021-06-29 16:10:21 -04:00
stats_test.go grpc: fix grpc metrics 2020-11-11 14:27:25 -05:00