Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): T3 Connect backs off from a failing relay instead of hammering it #22108

Mergedjuliusmarmingemerged 7 commits intomain fromrefs/pull/22108/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 206 additions and 0 deletions (loading 4).

x
0 of 5 viewed, 5 left
206 additions and 0 deletionsapps/server/src/cloud/managedTunnelStartup.test.tsModified
View file
@@ -1,13 +1,21 @@
import { describe, expect, it } from "@effect/vitest";
+import * as Clock from "effect/Clock";
import * as Deferred from "effect/Deferred";
+import * as Duration from "effect/Duration";
import * as Effect from "effect/Effect";
import * as Fiber from "effect/Fiber";
import * as TestClock from "effect/testing/TestClock";
​
import {
+ MANAGED_TUNNEL_RECOVERY_COOLDOWN,
+ makeManagedTunnelRecovery,
managedTunnelStartupAction,
+ nextManagedTunnelRecoveryCooldown,
+ relayRetrySchedule,
+ retryDesiredLinkReconcile,
retryManagedTunnelRegistration,
} from "./managedTunnelStartup.ts";
+import { RelayRequestError } from "./relayResponse.ts";
​
describe("managedTunnelStartupAction", () => {
const config = {
@@ -129,3 +137,201 @@
}),
});
+​
+describe("nextManagedTunnelRecoveryCooldown", () => {
+ const minutes = (value: number) => Duration.minutes(value);
+​