fix: increase retry attempts for builtin postgres port conflicts (#21796)

## Summary

Fixes flaky `TestServer/BuiltinPostgres` test caused by port conflicts
in CI.

## Fix

Increase retry attempts from 3 to 10 for better odds when port conflicts
occur.

Fixes https://github.com/coder/internal/issues/1017
This commit is contained in:
Garrett Delfosse
2026-02-05 13:36:32 -05:00
committed by GitHub
parent 11e17b3de9
commit 953a6159a4
+1 -1
View File
@@ -2174,7 +2174,7 @@ func startBuiltinPostgres(ctx context.Context, cfg config.Root, logger slog.Logg
// existing database
retryPortDiscovery := errors.Is(err, os.ErrNotExist) && testing.Testing()
if retryPortDiscovery {
maxAttempts = 3
maxAttempts = 10
}
var startErr error