GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: improve reliability in http2-session-timeout · nodejs/node@a40ee21

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/sequential
    • test-http2-session-timeout.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/sequential/test-http2-session-timeout.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-http2-session-timeout.js
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
const common = require('../common');
44
if (!common.hasCrypto)
55
common.skip('missing crypto');
6-
const h2 = require('http2');
6+
const http2 = require('http2');
77

88
const serverTimeout = common.platformTimeout(200);
9-
const callTimeout = common.platformTimeout(20);
109
const mustNotCall = common.mustNotCall();
1110

12-
const server = h2.createServer();
11+
const server = http2.createServer();
1312
server.timeout = serverTimeout;
1413

1514
server.on('request', (req, res) => res.end());
@@ -19,7 +18,7 @@ server.listen(0, common.mustCall(() => {
1918
const port = server.address().port;
2019

2120
const url = `http://localhost:${port}`;
22-
const client = h2.connect(url);
21+
const client = http2.connect(url);
2322
const startTime = process.hrtime();
2423
makeReq();
2524

@@ -37,7 +36,7 @@ server.listen(0, common.mustCall(() => {
3736
const diff = process.hrtime(startTime);
3837
const milliseconds = (diff[0] * 1e3 + diff[1] / 1e6);
3938
if (milliseconds < serverTimeout * 2) {
40-
setTimeout(makeReq, callTimeout);
39+
setImmediate(makeReq);
4140
} else {
4241
server.removeListener('timeout', mustNotCall);
4342
server.close();

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.