mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
workaround for appveyor memory limit
This commit is contained in:
parent
45840bf064
commit
5f8be57172
@ -14,6 +14,8 @@ const match = (regex, text) => (regex.exec(text) || [])[1]
|
||||
|
||||
const url = (route) => 'http://localhost:' + port + route
|
||||
|
||||
const isWindows = /^win/.test(process.platform)
|
||||
|
||||
// Init nuxt.js and create server listening on localhost:4000
|
||||
test.before('Init Nuxt.js', async t => {
|
||||
const options = {
|
||||
@ -93,6 +95,12 @@ test('unique responses with fetch', async t => {
|
||||
const stressTest = async (t, _url, concurrency = 64, steps = 256) => {
|
||||
let statusCodes = { }
|
||||
|
||||
// appveyor memory limit!
|
||||
if (isWindows) {
|
||||
concurrency = 1
|
||||
steps = 1
|
||||
}
|
||||
|
||||
await Utils.sequence(range(steps), async () => {
|
||||
await Utils.parallel(range(concurrency), async () => {
|
||||
let response = await rp(url(_url), { resolveWithFullResponse: true })
|
||||
|
Loading…
Reference in New Issue
Block a user