SIGN IN SIGN UP
fatedier / frp UNCLAIMED

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.

0 0 71 Go

test/e2e: replace RunProcesses client sleep with log-based proxy readiness detection (#5226)

* test/e2e: replace RunProcesses client sleep with log-based proxy readiness detection

Replace the fixed 1500ms sleep in RunProcesses with event-driven proxy
registration detection by monitoring frpc log output for "start proxy
success" messages.

Key changes:
- Add thread-safe SafeBuffer to replace bytes.Buffer in Process, enabling
  concurrent read/write of process output during execution
- Add Process.WaitForOutput() to poll process output for pattern matches
  with timeout and early exit on process termination
- Add waitForClientProxyReady() that uses config.LoadClientConfig() to
  extract proxy names, then waits for each proxy's success log
- For visitor-only clients (no deterministic readiness signal), fall back
  to the original sleep with elapsed time deducted

* test/e2e: use shared deadline for proxy readiness and fix doc comment

- Use a single deadline in waitForClientProxyReady so total wait across
  all proxies does not exceed the given timeout
- Fix WaitForOutput doc comment to accurately describe single pattern
  with count semantics
F
fatedier committed
9669e1ca0c2ea20030cc2b2604fd73dc397ba406
Parent: 48e8901
Committed by GitHub <noreply@github.com> on 3/9/2026, 2:28:23 PM