fix: address review-work round 3 findings (async shutdown, signal generation, stale test name)
This commit is contained in:
@@ -19,6 +19,7 @@ export function registerProcessCleanup(state: SkillMcpManagerState): void {
|
||||
state.cleanupRegistered = true
|
||||
|
||||
const cleanup = async (): Promise<void> => {
|
||||
state.shutdownGeneration++
|
||||
for (const managed of state.clients.values()) {
|
||||
await closeManagedClient(managed)
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ describe("getOrCreateClient disconnect race", () => {
|
||||
expect(createdTransports[0]?.close).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
|
||||
it("#given session A in disconnectedSessions #when new connection is requested for session A #then session A is removed from disconnectedSessions and connection proceeds normally", async () => {
|
||||
it("#given session A in disconnectedSessions #when new connection is requested for session A #then connection proceeds normally and disconnectedSessions entry is retained for pending race protection", async () => {
|
||||
const state = createState()
|
||||
const info = createClientInfo("session-a")
|
||||
const clientKey = createClientKey(info)
|
||||
|
||||
Reference in New Issue
Block a user