Skip to content

Commit

Permalink
tests: reduced times for longest running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tegefaulkes committed May 18, 2023
1 parent ac874bb commit a023bc0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions tests/QUICStream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe(QUICStream.name, () => {
await client?.destroy({ force: true });
await server?.stop({ force: true });
},
{ numRuns: 10 },
{ numRuns: 2 },
);
testProp(
'destroying stream should clean up on both ends while streams are used',
Expand Down Expand Up @@ -197,7 +197,7 @@ describe(QUICStream.name, () => {
await client?.destroy({ force: true });
await server?.stop({ force: true });
},
{ numRuns: 10 },
{ numRuns: 2 },
);
testProp(
'should send data over stream',
Expand Down Expand Up @@ -282,7 +282,7 @@ describe(QUICStream.name, () => {
await client?.destroy({ force: true });
await server?.stop({ force: true });
},
{ numRuns: 10 },
{ numRuns: 2 },
);
testProp(
'should propagate errors over stream for writable',
Expand Down Expand Up @@ -383,7 +383,7 @@ describe(QUICStream.name, () => {
await client?.destroy({ force: true });
await server?.stop({ force: true });
},
{ numRuns: 10 },
{ numRuns: 2 },
);
testProp.skip(
'should propagate errors over stream for readable',
Expand Down Expand Up @@ -493,7 +493,7 @@ describe(QUICStream.name, () => {
await client?.destroy({ force: true });
await server?.stop({ force: true });
},
{ numRuns: 10 },
{ numRuns: 2 },
);
testProp(
'should clean up streams when connection ends',
Expand Down Expand Up @@ -582,7 +582,7 @@ describe(QUICStream.name, () => {
await client?.destroy({ force: true });
await server?.stop({ force: true });
},
{ numRuns: 10 },
{ numRuns: 2 },
);
testProp(
'streams should contain metadata',
Expand Down Expand Up @@ -748,6 +748,6 @@ describe(QUICStream.name, () => {
await client?.destroy({ force: true });
await server?.stop({ force: true });
},
{ numRuns: 5 },
{ numRuns: 2 },
);
});
16 changes: 8 additions & 8 deletions tests/concurrency.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ describe('Concurrency tests', () => {
const streamArb = fc
.record({
messages: messagesArb,
startDelay: fc.integer({ min: 0, max: 100 }),
endDelay: fc.integer({ min: 0, max: 100 }),
delays: fc.array(fc.integer({ min: 0, max: 50 }), {
startDelay: fc.integer({ min: 0, max: 20 }),
endDelay: fc.integer({ min: 0, max: 20 }),
delays: fc.array(fc.integer({ min: 0, max: 10 }), {
size: 'small',
minLength: 1,
}),
Expand All @@ -109,9 +109,9 @@ describe('Concurrency tests', () => {
fc.array(streamArb, { size: 'small', minLength, maxLength }).noShrink();
const connectionArb = fc
.record({
streams: streamsArb(1, 10),
startDelay: fc.integer({ min: 0, max: 100 }),
endDelay: fc.integer({ min: 0, max: 100 }),
streams: streamsArb(1, 5),
startDelay: fc.integer({ min: 0, max: 20 }),
endDelay: fc.integer({ min: 0, max: 20 }),
})
.noShrink() as fc.Arbitrary<ConnectionData>;
const connectionsArb = fc
Expand Down Expand Up @@ -236,7 +236,7 @@ describe('Concurrency tests', () => {
}
logger.info('TEST FULLY DONE!');
},
{ numRuns: 2 },
{ numRuns: 1 },
);
testProp(
'Multiple clients sharing a socket',
Expand Down Expand Up @@ -361,7 +361,7 @@ describe('Concurrency tests', () => {
await socket.stop();
logger.info('TEST FULLY DONE!');
},
{ numRuns: 2 },
{ numRuns: 1 },
);
const spawnServer = async ({
socket,
Expand Down

0 comments on commit a023bc0

Please sign in to comment.