workaround for appveyor memory limit

This commit is contained in:
Pooya Parsa 2017-10-07 12:21:28 +03:30
parent 45840bf064
commit 5f8be57172

View File

@ -14,6 +14,8 @@ const match = (regex, text) => (regex.exec(text) || [])[1]
const url = (route) => 'http://localhost:' + port + route const url = (route) => 'http://localhost:' + port + route
const isWindows = /^win/.test(process.platform)
// Init nuxt.js and create server listening on localhost:4000 // Init nuxt.js and create server listening on localhost:4000
test.before('Init Nuxt.js', async t => { test.before('Init Nuxt.js', async t => {
const options = { const options = {
@ -93,6 +95,12 @@ test('unique responses with fetch', async t => {
const stressTest = async (t, _url, concurrency = 64, steps = 256) => { const stressTest = async (t, _url, concurrency = 64, steps = 256) => {
let statusCodes = { } let statusCodes = { }
// appveyor memory limit!
if (isWindows) {
concurrency = 1
steps = 1
}
await Utils.sequence(range(steps), async () => { await Utils.sequence(range(steps), async () => {
await Utils.parallel(range(concurrency), async () => { await Utils.parallel(range(concurrency), async () => {
let response = await rp(url(_url), { resolveWithFullResponse: true }) let response = await rp(url(_url), { resolveWithFullResponse: true })