frp/test/e2e
fatedier 9669e1ca0c
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
2026-03-09 22:28:23 +08:00
..
framework test/e2e: replace RunProcesses client sleep with log-based proxy readiness detection (#5226) 2026-03-09 22:28:23 +08:00
legacy test/e2e: optimize e2e test time by replacing sleeps with TCP readiness checks (#5223) 2026-03-08 23:41:33 +08:00
mock/server lint by golangci-lint (#3080) 2022-08-29 01:02:53 +08:00
pkg test/e2e: replace RunProcesses client sleep with log-based proxy readiness detection (#5226) 2026-03-09 22:28:23 +08:00
v1 test/e2e: optimize e2e test time by replacing sleeps with TCP readiness checks (#5223) 2026-03-08 23:41:33 +08:00
e2e.go vnet: fix issues (#4771) 2025-04-27 15:46:22 +08:00
e2e_test.go use new log package (#4054) 2024-03-12 13:58:53 +08:00
examples.go test/e2e: optimize e2e test time by replacing sleeps with TCP readiness checks (#5223) 2026-03-08 23:41:33 +08:00
suites.go frpc: consider include configs for verify and reload command (#2424) 2021-06-02 23:54:22 +08:00