Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v10) Fix tctl test timeouts #24218

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tool/tctl/common/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@ func makeAndRunTestAuthServer(t *testing.T, opts ...testServerOptionFunc) (auth
// timeout here because this isn't the kind of problem that this test is meant to catch.
require.NoError(t, err, "auth server didn't start after 30s")

// Wait for proxy to start up if it's enabled. Otherwise we may get racy
// behavior between startup and shutdown.
if cfg.Proxy.Enabled {
_, err = auth.WaitForEventTimeout(30*time.Second, service.ProxyWebServerReady)
require.NoError(t, err, "proxy server didn't start after 30s")
}

return auth
}

Expand Down
3 changes: 3 additions & 0 deletions tool/tctl/common/resource_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ func TestAppResource(t *testing.T) {
fileConfig := &config.FileConfig{
Global: config.Global{
DataDir: t.TempDir(),
Logger: config.Log{
Severity: "debug",
},
},
Apps: config.Apps{
Service: config.Service{
Expand Down