mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
M003: add TeamSpeak reconnect recovery
This commit is contained in:
1 parent
8c7a940de5
commit
3cca211ae9
10 files changed
+362
-98
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user