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)
	}
}

func TestHeartbeatUsesTunnelTolerantLivenessProfile(t *testing.T) {
	if heartbeatIntervalSec != 30 {
		t.Fatalf("heartbeatIntervalSec: got %d want 30", heartbeatIntervalSec)
	}
	if heartbeatWaitSec != 45 {
		t.Fatalf("heartbeatWaitSec: got %d want 45", heartbeatWaitSec)
	}
}
