@contember/engine-http 2.2.0-alpha.5 → 2.2.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/src/application/application.cjs +101 -19
- package/dist/development/src/application/application.cjs.map +1 -1
- package/dist/development/src/application/application.js +98 -16
- package/dist/development/src/application/application.js.map +1 -1
- package/dist/development/src/config/configSchema.cjs +2 -0
- package/dist/development/src/config/configSchema.cjs.map +1 -1
- package/dist/development/src/config/configSchema.js +2 -0
- package/dist/development/src/config/configSchema.js.map +1 -1
- package/dist/development/src/config/configTemplate.cjs +2 -0
- package/dist/development/src/config/configTemplate.cjs.map +1 -1
- package/dist/development/src/config/configTemplate.js +2 -0
- package/dist/development/src/config/configTemplate.js.map +1 -1
- package/dist/production/src/application/application.cjs +101 -19
- package/dist/production/src/application/application.cjs.map +1 -1
- package/dist/production/src/application/application.js +98 -16
- package/dist/production/src/application/application.js.map +1 -1
- package/dist/production/src/config/configSchema.cjs +2 -0
- package/dist/production/src/config/configSchema.cjs.map +1 -1
- package/dist/production/src/config/configSchema.js +2 -0
- package/dist/production/src/config/configSchema.js.map +1 -1
- package/dist/production/src/config/configTemplate.cjs +2 -0
- package/dist/production/src/config/configTemplate.cjs.map +1 -1
- package/dist/production/src/config/configTemplate.js +2 -0
- package/dist/production/src/config/configTemplate.js.map +1 -1
- package/dist/tests/cases/unit/applicationShutdown.test.d.ts +2 -0
- package/dist/tests/cases/unit/applicationShutdown.test.d.ts.map +1 -0
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/dist/types/application/application.d.ts +2 -0
- package/dist/types/application/application.d.ts.map +1 -1
- package/dist/types/config/configSchema.d.ts +12 -0
- package/dist/types/config/configSchema.d.ts.map +1 -1
- package/dist/types/config/configTemplate.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -15
- package/src/application/application.ts +100 -14
- package/src/config/configSchema.ts +2 -0
- package/src/config/configTemplate.ts +2 -0
- package/tests/cases/unit/applicationShutdown.test.ts +149 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/engine-http",
|
|
3
|
-
"version": "2.2.0-alpha.
|
|
3
|
+
"version": "2.2.0-alpha.6",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/production/index.js",
|
|
6
6
|
"typings": "./dist/types/index.d.ts",
|
|
@@ -26,20 +26,20 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@contember/config-loader": "2.2.0-alpha.
|
|
30
|
-
"@contember/database": "2.2.0-alpha.
|
|
31
|
-
"@contember/database-migrations": "2.2.0-alpha.
|
|
32
|
-
"@contember/dic": "2.2.0-alpha.
|
|
33
|
-
"@contember/engine-common": "2.2.0-alpha.
|
|
34
|
-
"@contember/engine-content-api": "2.2.0-alpha.
|
|
35
|
-
"@contember/engine-system-api": "2.2.0-alpha.
|
|
36
|
-
"@contember/engine-tenant-api": "2.2.0-alpha.
|
|
37
|
-
"@contember/graphql-utils": "2.2.0-alpha.
|
|
38
|
-
"@contember/logger": "2.2.0-alpha.
|
|
39
|
-
"@contember/schema": "2.2.0-alpha.
|
|
40
|
-
"@contember/schema-migrations": "2.2.0-alpha.
|
|
41
|
-
"@contember/schema-utils": "2.2.0-alpha.
|
|
42
|
-
"@contember/typesafe": "2.2.0-alpha.
|
|
29
|
+
"@contember/config-loader": "2.2.0-alpha.6",
|
|
30
|
+
"@contember/database": "2.2.0-alpha.6",
|
|
31
|
+
"@contember/database-migrations": "2.2.0-alpha.6",
|
|
32
|
+
"@contember/dic": "2.2.0-alpha.6",
|
|
33
|
+
"@contember/engine-common": "2.2.0-alpha.6",
|
|
34
|
+
"@contember/engine-content-api": "2.2.0-alpha.6",
|
|
35
|
+
"@contember/engine-system-api": "2.2.0-alpha.6",
|
|
36
|
+
"@contember/engine-tenant-api": "2.2.0-alpha.6",
|
|
37
|
+
"@contember/graphql-utils": "2.2.0-alpha.6",
|
|
38
|
+
"@contember/logger": "2.2.0-alpha.6",
|
|
39
|
+
"@contember/schema": "2.2.0-alpha.6",
|
|
40
|
+
"@contember/schema-migrations": "2.2.0-alpha.6",
|
|
41
|
+
"@contember/schema-utils": "2.2.0-alpha.6",
|
|
42
|
+
"@contember/typesafe": "2.2.0-alpha.6",
|
|
43
43
|
"@graphql-tools/merge": "^9.1.7",
|
|
44
44
|
"@graphql-tools/schema": "^10.0.31",
|
|
45
45
|
"@koa/cors": "^5.0.0",
|
|
@@ -19,6 +19,8 @@ import { performance } from 'node:perf_hooks'
|
|
|
19
19
|
import { getClientIP } from '../utils/remoteAddress.js'
|
|
20
20
|
import { isForceHttpOkRequested, shouldForceHttpOk } from './forceHttpOk.js'
|
|
21
21
|
|
|
22
|
+
const websocketCloseTimeoutMs = 5_000
|
|
23
|
+
|
|
22
24
|
type Route<C> = { match: RequestMatcher; controller: C; module: string }
|
|
23
25
|
export class Application {
|
|
24
26
|
private middlewares: KoaMiddleware<any>[] = []
|
|
@@ -75,6 +77,15 @@ export class Application {
|
|
|
75
77
|
async listen(): Promise<RunningApplication> {
|
|
76
78
|
const koa = new Koa()
|
|
77
79
|
const wss = new WebSocketServer({ noServer: true })
|
|
80
|
+
let closing = false
|
|
81
|
+
koa.use(async (ctx, next) => {
|
|
82
|
+
if (closing) {
|
|
83
|
+
ctx.status = 503
|
|
84
|
+
ctx.set('Connection', 'close')
|
|
85
|
+
return
|
|
86
|
+
}
|
|
87
|
+
await next()
|
|
88
|
+
})
|
|
78
89
|
for (const middleware of this.middlewares) {
|
|
79
90
|
koa.use(middleware)
|
|
80
91
|
}
|
|
@@ -92,11 +103,36 @@ export class Application {
|
|
|
92
103
|
await this.handleHttpRequest(ctx)
|
|
93
104
|
})
|
|
94
105
|
|
|
95
|
-
const
|
|
106
|
+
const activeHttpRequests = new Set<Promise<void>>()
|
|
107
|
+
const handleHttpRequest = koa.callback()
|
|
108
|
+
const server = http.createServer((request, response) => {
|
|
109
|
+
if (closing) {
|
|
110
|
+
handleHttpRequest(request, response)
|
|
111
|
+
return
|
|
112
|
+
}
|
|
113
|
+
let resolveRequest = () => {}
|
|
114
|
+
const completed = new Promise<void>(resolve => {
|
|
115
|
+
resolveRequest = resolve
|
|
116
|
+
})
|
|
117
|
+
activeHttpRequests.add(completed)
|
|
118
|
+
const complete = () => {
|
|
119
|
+
response.off('finish', complete)
|
|
120
|
+
response.off('close', complete)
|
|
121
|
+
activeHttpRequests.delete(completed)
|
|
122
|
+
resolveRequest()
|
|
123
|
+
}
|
|
124
|
+
response.once('finish', complete)
|
|
125
|
+
response.once('close', complete)
|
|
126
|
+
handleHttpRequest(request, response)
|
|
127
|
+
})
|
|
96
128
|
const abortController = new AbortController()
|
|
97
129
|
|
|
98
130
|
const wsRequests: (Promise<void>)[] = []
|
|
99
131
|
server.on('upgrade', (req, socket, head) => {
|
|
132
|
+
if (closing) {
|
|
133
|
+
this.sendRawHttpResponse(socket, new HttpErrorResponse(503, 'Server is shutting down'))
|
|
134
|
+
return
|
|
135
|
+
}
|
|
100
136
|
wsRequests.push(this.handleWebsocketRequest(wss, abortController.signal, req, socket, head))
|
|
101
137
|
})
|
|
102
138
|
await new Promise<void>(resolve => {
|
|
@@ -106,9 +142,25 @@ export class Application {
|
|
|
106
142
|
return {
|
|
107
143
|
server,
|
|
108
144
|
close: async () => {
|
|
145
|
+
closing = true
|
|
109
146
|
abortController.abort()
|
|
110
|
-
await Promise.all(wsRequests)
|
|
111
|
-
|
|
147
|
+
await Promise.all([...wsRequests, ...activeHttpRequests])
|
|
148
|
+
if (process.versions.bun !== undefined) {
|
|
149
|
+
// Bun does not finish server.close() after a WebSocket upgrade unless all connections are closed first.
|
|
150
|
+
server.closeAllConnections()
|
|
151
|
+
} else {
|
|
152
|
+
server.closeIdleConnections()
|
|
153
|
+
}
|
|
154
|
+
if (server.listening) {
|
|
155
|
+
await new Promise<void>(resolve =>
|
|
156
|
+
server.close(error => {
|
|
157
|
+
if (error) {
|
|
158
|
+
this.logger.error(error)
|
|
159
|
+
}
|
|
160
|
+
resolve()
|
|
161
|
+
})
|
|
162
|
+
)
|
|
163
|
+
}
|
|
112
164
|
},
|
|
113
165
|
}
|
|
114
166
|
}
|
|
@@ -146,12 +198,25 @@ export class Application {
|
|
|
146
198
|
|
|
147
199
|
const effectiveClientIp = authResult?.clientIp ?? clientIp
|
|
148
200
|
|
|
201
|
+
if (abortSignal.aborted) {
|
|
202
|
+
throw new HttpErrorResponse(503, 'Server is shutting down')
|
|
203
|
+
}
|
|
149
204
|
const ws = await new Promise<WebSocket>(resolve =>
|
|
150
205
|
wss.handleUpgrade(req, socket, head, (ws, request) => {
|
|
151
206
|
resolve(ws)
|
|
152
207
|
})
|
|
153
208
|
)
|
|
154
209
|
const wsEstablished = performance.now()
|
|
210
|
+
ws.on('error', e => {
|
|
211
|
+
requestLogger.error(e, {
|
|
212
|
+
websocketOpenMs: performance.now() - wsEstablished,
|
|
213
|
+
})
|
|
214
|
+
})
|
|
215
|
+
if (abortSignal.aborted) {
|
|
216
|
+
await this.closeWebsocket(ws)
|
|
217
|
+
return
|
|
218
|
+
}
|
|
219
|
+
const pendingWork: Promise<void>[] = []
|
|
155
220
|
webSocketContext = {
|
|
156
221
|
ws,
|
|
157
222
|
abortSignal,
|
|
@@ -163,23 +228,25 @@ export class Application {
|
|
|
163
228
|
authResult,
|
|
164
229
|
params: matchedRequest.params,
|
|
165
230
|
projectGroup: groupContainer,
|
|
231
|
+
waitUntil: promise => pendingWork.push(promise),
|
|
166
232
|
}
|
|
167
233
|
await matchedRequest.controller(webSocketContext)
|
|
234
|
+
if (abortSignal.aborted && ws.readyState === WebSocket.OPEN) {
|
|
235
|
+
ws.close(1012)
|
|
236
|
+
}
|
|
168
237
|
requestLogger.debug('Websocket connection established')
|
|
169
|
-
ws.on('error', e => {
|
|
170
|
-
requestLogger.error(e, {
|
|
171
|
-
websocketOpenMs: performance.now() - wsEstablished,
|
|
172
|
-
})
|
|
173
|
-
})
|
|
174
238
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
239
|
+
if (ws.readyState !== WebSocket.CLOSED) {
|
|
240
|
+
await new Promise<void>(resolve => {
|
|
241
|
+
ws.on('close', () => {
|
|
242
|
+
requestLogger.debug('Websocket connection closed', {
|
|
243
|
+
websocketOpenMs: performance.now() - wsEstablished,
|
|
244
|
+
})
|
|
245
|
+
resolve()
|
|
179
246
|
})
|
|
180
|
-
resolve()
|
|
181
247
|
})
|
|
182
|
-
}
|
|
248
|
+
}
|
|
249
|
+
await Promise.allSettled(pendingWork)
|
|
183
250
|
} catch (e) {
|
|
184
251
|
if (e instanceof HttpResponse) {
|
|
185
252
|
this.sendRawHttpResponse(socket, e)
|
|
@@ -338,6 +405,24 @@ export class Application {
|
|
|
338
405
|
}
|
|
339
406
|
}
|
|
340
407
|
|
|
408
|
+
private async closeWebsocket(ws: WebSocket): Promise<void> {
|
|
409
|
+
if (ws.readyState === WebSocket.CLOSED) {
|
|
410
|
+
return
|
|
411
|
+
}
|
|
412
|
+
ws.close(1012) // Service Restart
|
|
413
|
+
await new Promise<void>(resolve => {
|
|
414
|
+
// ws only gives up on the close handshake after 30 s, which outlives a typical shutdown grace period
|
|
415
|
+
const timeout = setTimeout(() => {
|
|
416
|
+
ws.terminate()
|
|
417
|
+
resolve()
|
|
418
|
+
}, websocketCloseTimeoutMs)
|
|
419
|
+
ws.once('close', () => {
|
|
420
|
+
clearTimeout(timeout)
|
|
421
|
+
resolve()
|
|
422
|
+
})
|
|
423
|
+
})
|
|
424
|
+
}
|
|
425
|
+
|
|
341
426
|
private sendRawHttpResponse(socket: Duplex, response: HttpResponse) {
|
|
342
427
|
const headers: Record<string, string> = {
|
|
343
428
|
...response.headers,
|
|
@@ -496,6 +581,7 @@ export type WebSocketContext =
|
|
|
496
581
|
& {
|
|
497
582
|
ws: WebSocket
|
|
498
583
|
abortSignal: AbortSignal
|
|
584
|
+
waitUntil(promise: Promise<void>): void
|
|
499
585
|
}
|
|
500
586
|
|
|
501
587
|
export type HttpControllerResponse = Promise<HttpErrorResponse | undefined | void> | HttpErrorResponse | undefined | void
|
|
@@ -16,6 +16,8 @@ const dbConfigOptional = {
|
|
|
16
16
|
statementTimeoutMs: Typesafe.number,
|
|
17
17
|
lockTimeoutMs: Typesafe.number,
|
|
18
18
|
connectionTimeoutMs: Typesafe.number,
|
|
19
|
+
keepAlive: Typesafe.boolean,
|
|
20
|
+
keepAliveInitialDelayMs: Typesafe.number,
|
|
19
21
|
maxConnectionsPerRequest: Typesafe.number,
|
|
20
22
|
pool: Typesafe.partial({
|
|
21
23
|
maxConnections: Typesafe.number,
|
|
@@ -5,6 +5,8 @@ const createDbConfigTemplate = (prefix: string) => {
|
|
|
5
5
|
statementTimeoutMs: `%?${prefix}_STATEMENT_TIMEOUT_MS::number%`,
|
|
6
6
|
lockTimeoutMs: `%?${prefix}_LOCK_TIMEOUT_MS::number%`,
|
|
7
7
|
connectionTimeoutMs: `%?${prefix}_CONNECTION_TIMEOUT_MS::number%`,
|
|
8
|
+
keepAlive: `%?${prefix}_KEEP_ALIVE::bool%`,
|
|
9
|
+
keepAliveInitialDelayMs: `%?${prefix}_KEEP_ALIVE_INITIAL_DELAY_MS::number%`,
|
|
8
10
|
maxConnectionsPerRequest: `%?${prefix}_MAX_CONNECTIONS_PER_REQUEST::number%`,
|
|
9
11
|
pool: {
|
|
10
12
|
maxConnections: `%?${prefix}_POOL_MAX_CONNECTIONS::number%`,
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test'
|
|
2
|
+
import { VerifyResult } from '@contember/engine-tenant-api'
|
|
3
|
+
import { createLogger, TestLoggerHandler } from '@contember/logger'
|
|
4
|
+
import { Readable } from 'node:stream'
|
|
5
|
+
import { WebSocket } from 'ws'
|
|
6
|
+
import { Application } from '../../../src/application/application.js'
|
|
7
|
+
import { Authenticator } from '../../../src/common/Authorizator.js'
|
|
8
|
+
import { serverConfigSchema } from '../../../src/config/configSchema.js'
|
|
9
|
+
import { ProjectGroupContainer } from '../../../src/projectGroup/ProjectGroupContainer.js'
|
|
10
|
+
import { ProjectGroupResolver } from '../../../src/projectGroup/ProjectGroupResolver.js'
|
|
11
|
+
import { createMock } from '../../utils.js'
|
|
12
|
+
|
|
13
|
+
const unavailable = (): never => {
|
|
14
|
+
throw new Error('This service is not available in the application shutdown test')
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const createTestApplication = (
|
|
18
|
+
authenticate: Authenticator['authenticate'] = async () => new VerifyResult('identity', 'api-key', ['member'], null),
|
|
19
|
+
) => {
|
|
20
|
+
const logger = createLogger(new TestLoggerHandler())
|
|
21
|
+
const authenticator = createMock<Authenticator>({ authenticate })
|
|
22
|
+
const projectGroup: ProjectGroupContainer = {
|
|
23
|
+
slug: undefined,
|
|
24
|
+
logger,
|
|
25
|
+
authenticator,
|
|
26
|
+
get projectMembershipResolver() {
|
|
27
|
+
return unavailable()
|
|
28
|
+
},
|
|
29
|
+
get projectContainerResolver() {
|
|
30
|
+
return unavailable()
|
|
31
|
+
},
|
|
32
|
+
get projectSchemaResolver() {
|
|
33
|
+
return unavailable()
|
|
34
|
+
},
|
|
35
|
+
get projectInitializer() {
|
|
36
|
+
return unavailable()
|
|
37
|
+
},
|
|
38
|
+
get tenantContainer() {
|
|
39
|
+
return unavailable()
|
|
40
|
+
},
|
|
41
|
+
get tenantGraphQLHandler() {
|
|
42
|
+
return unavailable()
|
|
43
|
+
},
|
|
44
|
+
get systemContainer() {
|
|
45
|
+
return unavailable()
|
|
46
|
+
},
|
|
47
|
+
get systemGraphQLHandler() {
|
|
48
|
+
return unavailable()
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
const projectGroupResolver = createMock<ProjectGroupResolver>({
|
|
52
|
+
resolveContainer: async () => projectGroup,
|
|
53
|
+
})
|
|
54
|
+
return new Application(projectGroupResolver, serverConfigSchema({ port: 0 }), false, undefined, logger)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
test('waits for an active HTTP stream when shutting down after a WebSocket upgrade', async () => {
|
|
58
|
+
const application = createTestApplication()
|
|
59
|
+
let releaseStream = () => {}
|
|
60
|
+
const streamReleased = new Promise<void>(resolve => {
|
|
61
|
+
releaseStream = resolve
|
|
62
|
+
})
|
|
63
|
+
application.addRoute('transfer', '/stream', context => {
|
|
64
|
+
context.koa.status = 200
|
|
65
|
+
context.koa.body = Readable.from((async function*() {
|
|
66
|
+
yield 'first'
|
|
67
|
+
await streamReleased
|
|
68
|
+
yield 'second'
|
|
69
|
+
})())
|
|
70
|
+
})
|
|
71
|
+
let resolveWebsocketCleanup = () => {}
|
|
72
|
+
const websocketCleanup = new Promise<void>(resolve => {
|
|
73
|
+
resolveWebsocketCleanup = resolve
|
|
74
|
+
})
|
|
75
|
+
application.addWebsocketRoute('actions', '/actions', ({ ws, abortSignal }) => {
|
|
76
|
+
abortSignal.addEventListener('abort', () => ws.close(1012), { once: true })
|
|
77
|
+
ws.once('close', resolveWebsocketCleanup)
|
|
78
|
+
})
|
|
79
|
+
const running = await application.listen()
|
|
80
|
+
const address = running.server.address()
|
|
81
|
+
if (address === null || typeof address === 'string') {
|
|
82
|
+
await running.close()
|
|
83
|
+
throw new Error('The test server did not bind to a TCP port')
|
|
84
|
+
}
|
|
85
|
+
const client = new WebSocket(`ws://127.0.0.1:${address.port}/actions`)
|
|
86
|
+
const opened = new Promise<void>((resolve, reject) => {
|
|
87
|
+
client.once('open', () => resolve())
|
|
88
|
+
client.once('error', reject)
|
|
89
|
+
})
|
|
90
|
+
const clientClosed = new Promise<number>(resolve => client.once('close', code => resolve(code)))
|
|
91
|
+
let shutdown: Promise<void> | undefined
|
|
92
|
+
try {
|
|
93
|
+
await opened
|
|
94
|
+
const response = await fetch(`http://127.0.0.1:${address.port}/stream`)
|
|
95
|
+
const responseBody = response.text()
|
|
96
|
+
let shutdownFinished = false
|
|
97
|
+
shutdown = running.close().then(() => {
|
|
98
|
+
shutdownFinished = true
|
|
99
|
+
})
|
|
100
|
+
await websocketCleanup
|
|
101
|
+
await new Promise<void>(resolve => setImmediate(resolve))
|
|
102
|
+
expect(shutdownFinished).toBe(false)
|
|
103
|
+
releaseStream()
|
|
104
|
+
expect(await responseBody).toBe('firstsecond')
|
|
105
|
+
await shutdown
|
|
106
|
+
expect(await clientClosed).toBe(1012)
|
|
107
|
+
} finally {
|
|
108
|
+
releaseStream()
|
|
109
|
+
shutdown ??= running.close()
|
|
110
|
+
await shutdown
|
|
111
|
+
client.terminate()
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
test('rejects a WebSocket upgrade whose authentication finishes during shutdown', async () => {
|
|
116
|
+
let releaseAuthentication = () => {}
|
|
117
|
+
const authenticationReleased = new Promise<void>(resolve => {
|
|
118
|
+
releaseAuthentication = resolve
|
|
119
|
+
})
|
|
120
|
+
let authenticationStarted = () => {}
|
|
121
|
+
const started = new Promise<void>(resolve => {
|
|
122
|
+
authenticationStarted = resolve
|
|
123
|
+
})
|
|
124
|
+
const application = createTestApplication(async () => {
|
|
125
|
+
authenticationStarted()
|
|
126
|
+
await authenticationReleased
|
|
127
|
+
return new VerifyResult('identity', 'api-key', ['member'], null)
|
|
128
|
+
})
|
|
129
|
+
let controllerCalled = false
|
|
130
|
+
application.addWebsocketRoute('actions', '/actions', () => {
|
|
131
|
+
controllerCalled = true
|
|
132
|
+
})
|
|
133
|
+
const running = await application.listen()
|
|
134
|
+
const address = running.server.address()
|
|
135
|
+
if (address === null || typeof address === 'string') {
|
|
136
|
+
await running.close()
|
|
137
|
+
throw new Error('The test server did not bind to a TCP port')
|
|
138
|
+
}
|
|
139
|
+
const client = new WebSocket(`ws://127.0.0.1:${address.port}/actions`)
|
|
140
|
+
client.on('error', () => {})
|
|
141
|
+
const clientClosed = new Promise<void>(resolve => client.once('close', () => resolve()))
|
|
142
|
+
|
|
143
|
+
await started
|
|
144
|
+
const shutdown = running.close()
|
|
145
|
+
releaseAuthentication()
|
|
146
|
+
await shutdown
|
|
147
|
+
await clientClosed
|
|
148
|
+
expect(controllerCalled).toBe(false)
|
|
149
|
+
})
|