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: split out http2 from test-stream-pipeline · nodejs/node@5e3b34f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • parallel.status
    • test-stream-pipeline-http2.js
    • test-stream-pipeline.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/parallel.status‎

Copy file name to clipboardExpand all lines: test/parallel/parallel.status
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ test-net-connect-options-port: PASS,FLAKY
1212
test-http2-pipe: PASS,FLAKY
1313
test-worker-syntax-error: PASS,FLAKY
1414
test-worker-syntax-error-file: PASS,FLAKY
15+
# https://github.com/nodejs/node/issues/24456
16+
test-stream-pipeline-http2: PASS,FLAKY
1517

1618
[$system==linux]
1719

Collapse file

‎test/parallel/test-stream-pipeline-http2.js‎

Copy file name to clipboard
+36Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
if (!common.hasCrypto)
5+
common.skip('missing crypto');
6+
const { Readable, pipeline } = require('stream');
7+
const http2 = require('http2');
8+
9+
{
10+
const server = http2.createServer((req, res) => {
11+
pipeline(req, res, common.mustCall());
12+
});
13+
14+
server.listen(0, () => {
15+
const url = `http://localhost:${server.address().port}`;
16+
const client = http2.connect(url);
17+
const req = client.request({ ':method': 'POST' });
18+
19+
const rs = new Readable({
20+
read() {
21+
rs.push('hello');
22+
}
23+
});
24+
25+
pipeline(rs, req, common.mustCall((err) => {
26+
server.close();
27+
client.close();
28+
}));
29+
30+
let cnt = 10;
31+
req.on('data', (data) => {
32+
cnt--;
33+
if (cnt === 0) rs.destroy();
34+
});
35+
});
36+
}
Collapse file

‎test/parallel/test-stream-pipeline.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-pipeline.js
-32Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
'use strict';
22

33
const common = require('../common');
4-
if (!common.hasCrypto)
5-
common.skip('missing crypto');
64
const { Stream, Writable, Readable, Transform, pipeline } = require('stream');
75
const assert = require('assert');
86
const http = require('http');
9-
const http2 = require('http2');
107
const { promisify } = require('util');
118

129
{
@@ -275,35 +272,6 @@ const { promisify } = require('util');
275272
});
276273
}
277274

278-
{
279-
const server = http2.createServer((req, res) => {
280-
pipeline(req, res, common.mustCall());
281-
});
282-
283-
server.listen(0, () => {
284-
const url = `http://localhost:${server.address().port}`;
285-
const client = http2.connect(url);
286-
const req = client.request({ ':method': 'POST' });
287-
288-
const rs = new Readable({
289-
read() {
290-
rs.push('hello');
291-
}
292-
});
293-
294-
pipeline(rs, req, common.mustCall((err) => {
295-
server.close();
296-
client.close();
297-
}));
298-
299-
let cnt = 10;
300-
req.on('data', (data) => {
301-
cnt--;
302-
if (cnt === 0) rs.destroy();
303-
});
304-
});
305-
}
306-
307275
{
308276
const makeTransform = () => {
309277
const tr = new Transform({

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.