2025-12-19 13:58:33 +00:00
|
|
|
import Testing
|
2026-01-30 03:15:10 +01:00
|
|
|
@testable import OpenClaw
|
2025-12-19 13:58:33 +00:00
|
|
|
|
|
|
|
|
@Suite struct NodePairingReconcilePolicyTests {
|
|
|
|
|
@Test func policyPollsOnlyWhenActive() {
|
|
|
|
|
#expect(NodePairingReconcilePolicy.shouldPoll(pendingCount: 0, isPresenting: false) == false)
|
|
|
|
|
#expect(NodePairingReconcilePolicy.shouldPoll(pendingCount: 1, isPresenting: false))
|
|
|
|
|
#expect(NodePairingReconcilePolicy.shouldPoll(pendingCount: 0, isPresenting: true))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test func policyUsesSlowSafetyInterval() {
|
2026-01-08 02:36:29 +00:00
|
|
|
#expect(NodePairingReconcilePolicy.activeIntervalMs >= 10000)
|
2025-12-19 13:58:33 +00:00
|
|
|
}
|
|
|
|
|
}
|