Dont close server on tests
This commit is contained in:
parent
11a7742d90
commit
c78038f059
|
@ -487,11 +487,6 @@
|
||||||
qs "^6.11.0"
|
qs "^6.11.0"
|
||||||
tough-cookie "^4.1.2"
|
tough-cookie "^4.1.2"
|
||||||
|
|
||||||
"@budibase/types@2.2.12-alpha.62":
|
|
||||||
version "2.2.12-alpha.62"
|
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.62.tgz#385ef000610d5c00b83cb2eafda2bd63c86b7f3f"
|
|
||||||
integrity sha512-idlhB4fSyBCEDWsVvQvdmN9Dg9VAEwxZ8TLE9pGnXIRZPg48MKXPNn5AUT9zv6cDlbQdlU2tFFF8st9b6lyLuw==
|
|
||||||
|
|
||||||
"@cspotcode/source-map-support@^0.8.0":
|
"@cspotcode/source-map-support@^0.8.0":
|
||||||
version "0.8.1"
|
version "0.8.1"
|
||||||
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
|
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
|
||||||
|
|
|
@ -62,6 +62,8 @@ initialiseWebsockets(server)
|
||||||
|
|
||||||
let shuttingDown = false,
|
let shuttingDown = false,
|
||||||
errCode = 0
|
errCode = 0
|
||||||
|
|
||||||
|
if (!env.isTest()) {
|
||||||
server.on("close", async () => {
|
server.on("close", async () => {
|
||||||
// already in process
|
// already in process
|
||||||
if (shuttingDown) {
|
if (shuttingDown) {
|
||||||
|
@ -74,10 +76,9 @@ server.on("close", async () => {
|
||||||
await events.shutdown()
|
await events.shutdown()
|
||||||
await Thread.shutdown()
|
await Thread.shutdown()
|
||||||
api.shutdown()
|
api.shutdown()
|
||||||
if (!env.isTest()) {
|
|
||||||
process.exit(errCode)
|
process.exit(errCode)
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export default server.listen(env.PORT || 0, async () => {
|
export default server.listen(env.PORT || 0, async () => {
|
||||||
await startup(app, server)
|
await startup(app, server)
|
||||||
|
|
Loading…
Reference in New Issue