Skip to content

Commit 31212dc

Browse files
committed
tests: fixes to tests failing
* Related #14 [ci skip]
1 parent 390769c commit 31212dc

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

tests/QUICClient.test.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as errors from '@/errors';
1010
import { promise } from '@/utils';
1111
import QUICSocket from '@/QUICSocket';
1212
import * as testsUtils from './utils';
13-
import { tlsConfigWithCaArb } from './tlsUtils';
13+
import { tlsConfigWithCaArb, tlsConfigWithCaGENOKPArb } from './tlsUtils';
1414
import { sleep } from './utils';
1515
import * as fixtures from './fixtures/certFixtures';
1616

@@ -188,7 +188,7 @@ describe(QUICClient.name, () => {
188188
await expect(
189189
QUICClient.createQUICClient({
190190
host: '127.0.0.1' as Host,
191-
port: 55555 as Port,
191+
port: 56666 as Port,
192192
localHost: '127.0.0.1' as Host,
193193
crypto,
194194
logger: logger.getChild(QUICClient.name),
@@ -251,10 +251,9 @@ describe(QUICClient.name, () => {
251251
},
252252
{ numRuns: 10 },
253253
);
254-
// FIXME: randomly fails, likely due to test data selecting same cert
255254
testProp(
256255
'new connections use new config',
257-
[tlsConfigWithCaArb, tlsConfigWithCaArb],
256+
[tlsConfigWithCaGENOKPArb, tlsConfigWithCaGENOKPArb],
258257
async (tlsConfigProm1, tlsConfigProm2) => {
259258
const tlsConfig1 = await tlsConfigProm1;
260259
const tlsConfig2 = await tlsConfigProm2;
@@ -599,7 +598,7 @@ describe(QUICClient.name, () => {
599598
const result = await server.initHolePunch(
600599
{
601600
host: '127.0.0.1' as Host,
602-
port: 55555 as Port,
601+
port: 52222 as Port,
603602
},
604603
2000,
605604
);
@@ -1385,7 +1384,7 @@ describe(QUICClient.name, () => {
13851384
test('Keep alive does not prevent connection timeout', async () => {
13861385
const clientProm = QUICClient.createQUICClient({
13871386
host: '::ffff:127.0.0.1' as Host,
1388-
port: 55555 as Port,
1387+
port: 54444 as Port,
13891388
localHost: '::' as Host,
13901389
crypto,
13911390
logger: logger.getChild(QUICClient.name),

tests/QUICSocket.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe(QUICSocket.name, () => {
9797
dualStackSocketClose = utils
9898
.promisify(dualStackSocket.close)
9999
.bind(dualStackSocket);
100-
await ipv4SocketBind(55555, '127.0.0.1');
100+
await ipv4SocketBind(57777, '127.0.0.1');
101101
await ipv6SocketBind(0, '::1');
102102
await dualStackSocketBind(0, '::');
103103
ipv4SocketPort = ipv4Socket.address().port;

tests/QUICStream.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ describe(QUICStream.name, () => {
229229
);
230230
await server.start({
231231
host: '127.0.0.1' as Host,
232-
port: 55555 as Port,
232+
port: 58888 as Port,
233233
});
234234
const client = await QUICClient.createQUICClient({
235235
host: '::ffff:127.0.0.1' as Host,
@@ -322,7 +322,7 @@ describe(QUICStream.name, () => {
322322
);
323323
await server.start({
324324
host: '127.0.0.1' as Host,
325-
port: 55555 as Port,
325+
port: 59999 as Port,
326326
});
327327
const client = await QUICClient.createQUICClient({
328328
host: '::ffff:127.0.0.1' as Host,
@@ -423,7 +423,7 @@ describe(QUICStream.name, () => {
423423
);
424424
await server.start({
425425
host: '127.0.0.1' as Host,
426-
port: 55555 as Port,
426+
port: 60000 as Port,
427427
});
428428
const client = await QUICClient.createQUICClient({
429429
host: '::ffff:127.0.0.1' as Host,

tests/concurrency.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ describe('Concurrency tests', () => {
2828

2929
// Tracking resources
3030
let sockets: Array<QUICSocket>;
31+
const socketPort1 = 50001 as Port;
3132

3233
const reasonToCode = (type: 'recv' | 'send', reason?: any) => {
3334
logger.error(type, reason);
@@ -172,7 +173,7 @@ describe('Concurrency tests', () => {
172173
await sleep(100);
173174
await server.start({
174175
host: '127.0.0.1' as Host,
175-
port: 55555 as Port,
176+
port: socketPort1,
176177
});
177178
try {
178179
await cleanUpHoldProm.p;
@@ -196,7 +197,7 @@ describe('Concurrency tests', () => {
196197
logger.info('STARTING CLIENT');
197198
return QUICClient.createQUICClient({
198199
host: '::ffff:127.0.0.1' as Host,
199-
port: 55555 as Port,
200+
port: socketPort1,
200201
localHost: '::' as Host,
201202
crypto,
202203
logger: logger.getChild(QUICClient.name),
@@ -288,7 +289,7 @@ describe('Concurrency tests', () => {
288289
await sleep(100);
289290
await server.start({
290291
host: '127.0.0.1' as Host,
291-
port: 55556 as Port,
292+
port: socketPort1,
292293
});
293294
try {
294295
await cleanUpHoldProm.p;
@@ -320,7 +321,7 @@ describe('Concurrency tests', () => {
320321
logger.info('STARTING CLIENT');
321322
return QUICClient.createQUICClient({
322323
host: '127.0.0.1' as Host,
323-
port: 55556 as Port,
324+
port: socketPort1,
324325
socket,
325326
crypto,
326327
logger: logger.getChild(QUICClient.name),

0 commit comments

Comments
 (0)