mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
test: update tests and comments to reflect new autoSelectFamily default
- Update test expectation: 'defaults to enable on Node 22' - Update comment in fetch.ts to explain IPv4 fallback rationale - Addresses greptile review feedback
This commit is contained in:
committed by
Peter Steinberger
parent
c762bf71f6
commit
d43c11c76d
@@ -7,7 +7,8 @@ import { resolveTelegramAutoSelectFamilyDecision } from "./network-config.js";
|
||||
let appliedAutoSelectFamily: boolean | null = null;
|
||||
const log = createSubsystemLogger("telegram/network");
|
||||
|
||||
// Node 22 workaround: disable autoSelectFamily to avoid Happy Eyeballs timeouts.
|
||||
// Node 22 workaround: enable autoSelectFamily to allow IPv4 fallback on broken IPv6 networks.
|
||||
// Many networks have IPv6 configured but not routed, causing "Network is unreachable" errors.
|
||||
// See: https://github.com/nodejs/node/issues/54359
|
||||
function applyTelegramNetworkWorkarounds(network?: TelegramNetworkConfig): void {
|
||||
const decision = resolveTelegramAutoSelectFamilyDecision({ network });
|
||||
|
||||
@@ -36,9 +36,9 @@ describe("resolveTelegramAutoSelectFamilyDecision", () => {
|
||||
expect(decision).toEqual({ value: true, source: "config" });
|
||||
});
|
||||
|
||||
it("defaults to disable on Node 22", () => {
|
||||
it("defaults to enable on Node 22", () => {
|
||||
const decision = resolveTelegramAutoSelectFamilyDecision({ env: {}, nodeMajor: 22 });
|
||||
expect(decision).toEqual({ value: false, source: "default-node22" });
|
||||
expect(decision).toEqual({ value: true, source: "default-node22" });
|
||||
});
|
||||
|
||||
it("returns null when no decision applies", () => {
|
||||
|
||||
Reference in New Issue
Block a user