High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
fix: increase timeouts to handle slow Chrome initialization
Marioe63e045961f4
diff --git a/cmd/pinchtab/browser_test.go b/cmd/pinchtab/browser_test.goindex 685915a0..94b82fd4 100644--- a/cmd/pinchtab/browser_test.go+++ b/cmd/pinchtab/browser_test.go@@ -9,8 +9,8 @@ import (// TestBuildChromeOpts_HeadlessMode verifies that headless mode adds chromedp.Headlessfunc TestBuildChromeOpts_HeadlessMode(t *testing.T) {cfg := &config.RuntimeConfig{- Headless: true,- ProfileDir: "/tmp/test-profile",+ Headless: true,+ ProfileDir: "/tmp/test-profile",ChromeBinary: "",}@@ -37,8 +37,8 @@ func TestBuildChromeOpts_HeadlessMode(t *testing.T) {// TestBuildChromeOpts_HeadedMode verifies that headed mode does NOT add any headless flagfunc TestBuildChromeOpts_HeadedMode(t *testing.T) {cfg := &config.RuntimeConfig{- Headless: false,- ProfileDir: "/tmp/test-profile",+ Headless: false,+ ProfileDir: "/tmp/test-profile",ChromeBinary: "",}@@ -60,14 +60,14 @@ func TestBuildChromeOpts_HeadedMode(t *testing.T) {// TestBuildChromeOpts_ComparesOptions verifies that headless and headed modes differfunc TestBuildChromeOpts_ComparesOptions(t *testing.T) {cfgHeadless := &config.RuntimeConfig{- Headless: true,- ProfileDir: "/tmp/test-profile",+ Headless: true,+ ProfileDir: "/tmp/test-profile",ChromeBinary: "",}cfgHeaded := &config.RuntimeConfig{- Headless: false,- ProfileDir: "/tmp/test-profile",+ Headless: false,+ ProfileDir: "/tmp/test-profile",ChromeBinary: "",}@@ -88,8 +88,8 @@ func TestBuildChromeOpts_ComparesOptions(t *testing.T) {func TestBuildChromeOpts_WithCustomBinary(t *testing.T) {customBinary := "/custom/path/to/chrome"cfg := &config.RuntimeConfig{- Headless: true,- ProfileDir: "/tmp/test-profile",+ Headless: true,+ ProfileDir: "/tmp/test-profile",ChromeBinary: customBinary,}diff --git a/internal/config/config.go b/internal/config/config.goindex ed030354..6af1761e 100644--- a/internal/config/config.go+++ b/internal/config/config.go@@ -119,8 +119,8 @@ func Load() *RuntimeConfig {UserAgent: os.Getenv("BRIDGE_USER_AGENT"),NoAnimations: os.Getenv("BRIDGE_NO_ANIMATIONS") == "true",StealthLevel: envOr("BRIDGE_STEALTH", "light"),- ActionTimeout: 15 * time.Second,- NavigateTimeout: 30 * time.Second,+ ActionTimeout: 30 * time.Second,+ NavigateTimeout: 60 * time.Second,ShutdownTimeout: 10 * time.Second,WaitNavDelay: 1 * time.Second,}diff --git a/internal/handlers/health_tabs_test.go b/internal/handlers/health_tabs_test.goindex 26bbe1af..8992f395 100644--- a/internal/handlers/health_tabs_test.go+++ b/internal/handlers/health_tabs_test.go@@ -175,9 +175,9 @@ func TestHandleTabs_Success(t *testing.T) {// TestHandleHealth_EnsureChromeFailure verifies /health returns 503 when Chrome initialization failsfunc TestHandleHealth_EnsureChromeFailure(t *testing.T) {mockBridge := &MockBridge{- targets: []*target.Info{},- ensureChromeErr: "failed to start Chrome: connection refused",- ensureChromeCalled: false,+ targets: []*target.Info{},+ ensureChromeErr: "failed to start Chrome: connection refused",+ ensureChromeCalled: false,}h := &Handlers{@@ -267,10 +267,10 @@ func contains(s, substr string) bool {// MockBridge is a test implementation of the BridgeAPI interfacetype MockBridge struct {- targets []*target.Info- listTargetsErr string- ensureChromeCalled bool- ensureChromeErr string+ targets []*target.Info+ listTargetsErr string+ ensureChromeCalled bool+ ensureChromeErr string}func (m *MockBridge) ListTargets() ([]*target.Info, error) {