🚀 feat: make random ports default for BDD tests to prevent conflicts
Some checks failed
CI/CD Pipeline / Build Docker Cache (push) Successful in 8s
CI/CD Pipeline / CI Pipeline (push) Failing after 4m1s

This commit is contained in:
2026-04-10 14:36:43 +02:00
parent 7b0135c537
commit 778d8822dc
2 changed files with 69 additions and 2 deletions

View File

@@ -36,8 +36,9 @@ func NewServer() *Server {
feature := os.Getenv("FEATURE")
port := 9191 // Default port
// Check for random port mode (better for parallel testing)
if os.Getenv("RANDOM_TEST_PORT") == "true" {
// Use random port by default for better parallel testing
// Can be disabled with FIXED_TEST_PORT=true if needed
if os.Getenv("FIXED_TEST_PORT") != "true" {
// Generate a random port in the test range (10000-19999)
port = 10000 + rand.Intn(9999)
log.Debug().Int("port", port).Msg("Using random test port")