M003: add TeamSpeak reconnect recovery

This commit is contained in:
illusia committed 2026-09-01 16:59:48 +08:00
1 parent 8c7a940de5
commit 3cca211ae9
10 files changed
+362 -98

No files matched your search

+12
View File
@@ -14,6 +14,18 @@ test("connection state machine accepts the normal lifecycle and rejects illegal
assert.throws(() => machine.transition("connected"), /Illegal connection state transition/);
});
test("connection state machine can retry a transient authentication phase", () => {
const machine = new ConnectionStateMachine();
machine.transition("connecting");
machine.transition("authenticating");
machine.transition("reconnecting");
machine.transition("connecting");
machine.transition("authenticating");
machine.transition("syncing");
machine.transition("connected");
assert.equal(machine.state, "connected");
});
test("managed session teardown is idempotent and reaches idle even when cleanup fails", async () => {
const manager = new SessionManager();
let cleanupCalls = 0;