Skip to content
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
12 changes: 6 additions & 6 deletions test/integration/binary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ func TestBinaryInvocation_LogFileCreation(t *testing.T) {
defer os.Remove(configFile)

// Start the server process with custom log directory
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second)
defer cancel()

port := "13006"
Expand All @@ -873,9 +873,9 @@ func TestBinaryInvocation_LogFileCreation(t *testing.T) {
}
}()

// Wait for server to start
// Wait for server to start — allow time for Docker image pulls in CI
serverURL := "http://127.0.0.1:" + port
if !waitForServer(t, serverURL+"/health", 5*time.Second) {
if !waitForServer(t, serverURL+"/health", 40*time.Second) {
t.Logf("STDOUT: %s", stdout.String())
t.Logf("STDERR: %s", stderr.String())
t.Fatal("Server did not start in time")
Expand Down Expand Up @@ -996,7 +996,7 @@ func TestBinaryInvocation_LogDirEnvironmentVariable(t *testing.T) {
defer os.Remove(configFile)

// Start the server process with MCP_GATEWAY_LOG_DIR environment variable (no --log-dir flag)
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second)
defer cancel()

port := "13007"
Expand All @@ -1023,9 +1023,9 @@ func TestBinaryInvocation_LogDirEnvironmentVariable(t *testing.T) {
}
}()

// Wait for server to start
// Wait for server to start — allow time for Docker image pulls in CI
serverURL := "http://127.0.0.1:" + port
if !waitForServer(t, serverURL+"/health", 5*time.Second) {
if !waitForServer(t, serverURL+"/health", 40*time.Second) {
t.Logf("STDOUT: %s", stdout.String())
t.Logf("STDERR: %s", stderr.String())
t.Fatal("Server did not start in time")
Expand Down
8 changes: 4 additions & 4 deletions test/integration/difc_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func TestDIFCConfigWithGuards(t *testing.T) {
}
}`, port)

ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel()

cmd := exec.CommandContext(ctx, binary, "--config-stdin", "--log-dir", logDir)
Expand All @@ -242,9 +242,9 @@ func TestDIFCConfigWithGuards(t *testing.T) {
err := cmd.Start()
require.NoError(t, err, "Failed to start gateway")

// Wait for full startup — ensures all servers are processed and log files flushed
ok := waitForStderr(&stderr, "Starting MCPG", 15*time.Second)
require.Truef(t, ok, "timeout waiting for gateway startup within %s; stderr:\n%s", 15*time.Second, stderr.String())
// Wait for full startup — allows time for Docker image pulls in CI
ok := waitForStderr(&stderr, "Starting MCPG", 50*time.Second)
require.Truef(t, ok, "timeout waiting for gateway startup within %s; stderr:\n%s", 50*time.Second, stderr.String())

// Try health check
resp, err := http.Get(fmt.Sprintf("http://127.0.0.1:%d/health", port))
Expand Down
Loading