fix(xo-server-test): extend timeout of deleteTempResources
(#5117)
This commit is contained in:
parent
cda39ec256
commit
dfdd0a0496
8
packages/xo-server-test/config.toml
Normal file
8
packages/xo-server-test/config.toml
Normal file
@ -0,0 +1,8 @@
|
||||
# Vendor config: DO NOT TOUCH!
|
||||
#
|
||||
# See sample.config.toml to override.
|
||||
|
||||
# After some executions we saw that `deleteTempResources` takes around `21s`.
|
||||
# Then, we chose a large timeout to be sure that all resources created by `xo-server-test`
|
||||
# will be deleted
|
||||
deleteTempResourcesTimeout = '2 minutes'
|
@ -31,6 +31,7 @@
|
||||
"@babel/plugin-proposal-decorators": "^7.4.0",
|
||||
"@babel/preset-env": "^7.1.6",
|
||||
"@iarna/toml": "^2.2.1",
|
||||
"@vates/parse-duration": "^0.1.0",
|
||||
"app-conf": "^0.7.0",
|
||||
"babel-plugin-lodash": "^3.2.11",
|
||||
"golike-defer": "^0.4.1",
|
||||
|
@ -4,6 +4,7 @@ import Xo from 'xo-lib'
|
||||
import XoCollection from 'xo-collection'
|
||||
import { defaultsDeep, find, forOwn, pick } from 'lodash'
|
||||
import { fromEvent } from 'promise-toolbox'
|
||||
import { parseDuration } from '@vates/parse-duration'
|
||||
|
||||
import config from './_config'
|
||||
import { getDefaultName } from './_defaultValues'
|
||||
@ -278,7 +279,11 @@ afterAll(async () => {
|
||||
await xo.close()
|
||||
xo = null
|
||||
})
|
||||
afterEach(() => xo.deleteTempResources())
|
||||
afterEach(async () => {
|
||||
jest.setTimeout(parseDuration(config.deleteTempResourcesTimeout))
|
||||
|
||||
await xo.deleteTempResources()
|
||||
})
|
||||
|
||||
export { xo as default }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user