Skip to content

Commit f0583b6

Browse files
committed
Fix bug in H2 test data & expectations broken by latest Node
This was our bug, but was hidden by Node's SNI handling. That got tightened in a fix recently, and this started failing. It included the port in the SNI, which should never happen. With this change it's more representative of real traffic (ish, it's still a broken edge case) and should hopefully pass everywhere.
1 parent 2923728 commit f0583b6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/integration/subscriptions/client-error-events.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ describe("Client error subscription", () => {
286286
await server.on('client-error', (e) => errorPromise.resolve(e));
287287

288288
const socket = await openRawTlsSocket(server, {
289-
servername: `localhost:${server.port}`,
289+
servername: 'localhost',
290290
ALPNProtocols: ['h2']
291291
});
292292

@@ -299,7 +299,7 @@ describe("Client error subscription", () => {
299299
'client-error:ERR_HTTP2_ERROR',
300300
'client-error:bad-preface'
301301
]);
302-
expect(error.request.url).to.equal(server.url + '/');
302+
expect(error.request.url).to.equal('https://localhost/');
303303
expect(error.response).to.equal('aborted');
304304

305305
expect(error.request.timingEvents.startTime).to.be.greaterThan(0);
@@ -315,7 +315,7 @@ describe("Client error subscription", () => {
315315
await server.on('client-error', (e) => errorPromise.resolve(e));
316316

317317
const socket = await openRawTlsSocket(server, {
318-
servername: `localhost:${server.port}`,
318+
servername: 'localhost',
319319
ALPNProtocols: ['h2']
320320
});
321321

@@ -328,7 +328,7 @@ describe("Client error subscription", () => {
328328
expect(error.request.tags).to.deep.equal([
329329
'client-error:ERR_HTTP2_ERROR'
330330
]);
331-
expect(error.request.url).to.equal(server.url + '/');
331+
expect(error.request.url).to.equal('https://localhost/');
332332
expect(error.response).to.equal('aborted');
333333
});
334334

0 commit comments

Comments
 (0)