@libp2p/interface-stream-muxer-compliance-tests
Version:
Compliance tests for implementations of the libp2p Stream Muxer interface
23 lines • 1.41 kB
JavaScript
import spawn from './spawner.js';
export default (common) => {
const createMuxer = async (init) => {
const factory = await common.setup();
return factory.createStreamMuxer(init);
};
describe('stress test', function () {
this.timeout(800000);
it('1 stream with 1 msg', async () => { await spawn(createMuxer, 1, 1); });
it('1 stream with 10 msg', async () => { await spawn(createMuxer, 1, 10); });
it('1 stream with 100 msg', async () => { await spawn(createMuxer, 1, 100); });
it('10 streams with 1 msg', async () => { await spawn(createMuxer, 10, 1); });
it('10 streams with 10 msg', async () => { await spawn(createMuxer, 10, 10); });
it('10 streams with 100 msg', async () => { await spawn(createMuxer, 10, 100); });
it('100 streams with 1 msg', async () => { await spawn(createMuxer, 100, 1); });
it('100 streams with 10 msg', async () => { await spawn(createMuxer, 100, 10); });
it('100 streams with 100 msg', async () => { await spawn(createMuxer, 100, 100); });
it('1000 streams with 1 msg', async () => { await spawn(createMuxer, 1000, 1); });
it('1000 streams with 10 msg', async () => { await spawn(createMuxer, 1000, 10); });
it('1000 streams with 100 msg', async () => { await spawn(createMuxer, 1000, 100); });
});
};
//# sourceMappingURL=stress-test.js.map