mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Don't run the verifier loop when app created from test
GitOrigin-RevId: e8a565ae00019de66cbbaf961e0ee3ace90f800e
This commit is contained in:
@@ -90,15 +90,16 @@ process.on('SIGINT', () => {
|
||||
|
||||
/**
|
||||
* @param {number} port
|
||||
* @param {boolean} enableVerificationLoop
|
||||
* @return {Promise<http.Server>}
|
||||
*/
|
||||
export async function startApp(port) {
|
||||
export async function startApp(port, enableVerificationLoop = true) {
|
||||
await mongodb.client.connect()
|
||||
await loadGlobalBlobs()
|
||||
await healthCheck()
|
||||
const server = http.createServer(app)
|
||||
await promisify(server.listen.bind(server, port))()
|
||||
loopRandomProjects(shutdownEmitter)
|
||||
enableVerificationLoop && loopRandomProjects(shutdownEmitter)
|
||||
return server
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ async function listenOnRandomPort() {
|
||||
return
|
||||
} catch {}
|
||||
}
|
||||
server = await startApp(0)
|
||||
server = await startApp(0, false)
|
||||
}
|
||||
|
||||
after('close server', function (done) {
|
||||
|
||||
Reference in New Issue
Block a user