14 lines
640 B
Go
14 lines
640 B
Go
package transport
|
|
|
|
import "testing"
|
|
|
|
// TestHeartbeatWaitExceedsInterval guards the edge-side invariant. Even though
|
|
// the library now self-heals stale wait timers (proto-socket base_client.go,
|
|
// wait-timer state check), keeping wait > interval gives the peer's next
|
|
// heartbeat an extra chance to clear the stray timer before it fires, which
|
|
// keeps idle traffic stable on slow links. Mirror of the node-side test.
|
|
func TestHeartbeatWaitExceedsInterval(t *testing.T) {
|
|
if heartbeatWaitSec <= heartbeatIntervalSec {
|
|
t.Fatalf("heartbeatWaitSec (%d) must exceed heartbeatIntervalSec (%d)", heartbeatWaitSec, heartbeatIntervalSec)
|
|
}
|
|
}
|