2016-08-18 16:18:17 +02:00
|
|
|
/* eslint-env mocha */
|
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const spawn = require('./spawner')
|
|
|
|
|
|
|
|
module.exports = (common) => {
|
|
|
|
describe('stress test', () => {
|
2019-09-16 16:48:04 +01:00
|
|
|
let Muxer
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
Muxer = await common.setup()
|
|
|
|
})
|
|
|
|
|
|
|
|
it('1 stream with 1 msg', () => spawn(Muxer, 1, 1))
|
|
|
|
it('1 stream with 10 msg', () => spawn(Muxer, 1, 10))
|
|
|
|
it('1 stream with 100 msg', () => spawn(Muxer, 1, 100))
|
|
|
|
it('10 streams with 1 msg', () => spawn(Muxer, 10, 1))
|
|
|
|
it('10 streams with 10 msg', () => spawn(Muxer, 10, 10))
|
|
|
|
it('10 streams with 100 msg', () => spawn(Muxer, 10, 100))
|
|
|
|
it('100 streams with 1 msg', () => spawn(Muxer, 100, 1))
|
|
|
|
it('100 streams with 10 msg', () => spawn(Muxer, 100, 10))
|
|
|
|
it('100 streams with 100 msg', () => spawn(Muxer, 100, 100))
|
|
|
|
it('1000 streams with 1 msg', () => spawn(Muxer, 1000, 1))
|
|
|
|
it('1000 streams with 10 msg', () => spawn(Muxer, 1000, 10))
|
|
|
|
it('1000 streams with 100 msg', function () {
|
|
|
|
this.timeout(30 * 1000)
|
|
|
|
return spawn(Muxer, 1000, 100)
|
2016-08-18 16:18:17 +02:00
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|