mirror of
https://github.com/fatedier/frp.git
synced 2026-03-18 15:59:16 +08:00
test/e2e: optimize e2e test time by replacing sleeps with TCP readiness checks (#5223)
Replace the fixed 500ms sleep after each frps startup in RunProcesses with a TCP dial-based readiness check that polls the server bind port. This reduces the e2e suite wall time from ~97s to ~43s. Also simplify the RunProcesses API to accept a single server template string instead of a slice, matching how every call site uses it.
This commit is contained in:
@@ -61,6 +61,10 @@ func (p *Process) StdOutput() string {
|
||||
return p.stdOutput.String()
|
||||
}
|
||||
|
||||
func (p *Process) Output() string {
|
||||
return p.stdOutput.String() + p.errorOutput.String()
|
||||
}
|
||||
|
||||
func (p *Process) SetBeforeStopHandler(fn func()) {
|
||||
p.beforeStopHandler = fn
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user