fix(tailnet): Improve tailnet setup and agentconn stability (#6292)

* fix(tailnet): Improve start and close to detect connection races

* fix: Prevent agentConn use before ready via AwaitReachable

* fix(tailnet): Ensure connstats are closed on conn close

* fix(codersdk): Use AwaitReachable in DialWorkspaceAgent

* fix(tailnet): Improve logging via slog.Helper()
This commit is contained in:
Mathias Fredriksson
2023-02-24 13:11:28 +02:00
committed by GitHub
parent 473ab208af
commit a414de9e81
6 changed files with 107 additions and 25 deletions

View File

@ -469,6 +469,8 @@ func TestWorkspaceAgentListeningPorts(t *testing.T) {
t.Parallel()
setup := func(t *testing.T, apps []*proto.App) (*codersdk.Client, uint16, uuid.UUID) {
t.Helper()
client := coderdtest.New(t, &coderdtest.Options{
IncludeProvisionerDaemon: true,
})