Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4ff79fb

Browse filesBrowse files
lpincaaduh95
authored andcommitted
test: reduce number of written chunks
Reduce chances of write errors while the request is sent. Refs: #56756 PR-URL: #56757 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
1 parent 2e7b7b7 commit 4ff79fb
Copy full SHA for 4ff79fb
Expand file treeCollapse file tree

6 files changed

+35
-25
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-http-server-headers-timeout-delayed-headers.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-server-headers-timeout-delayed-headers.js
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ server.listen(0, common.mustCall(() => {
5555

5656
sendDelayedRequestHeaders = common.mustCall(() => {
5757
setTimeout(() => {
58-
client.write('POST / HTTP/1.1\r\n');
59-
client.write('Content-Length: 20\r\n');
60-
client.write('Connection: close\r\n\r\n');
61-
client.write('12345678901234567890\r\n\r\n');
58+
client.write(
59+
'POST / HTTP/1.1\r\n' +
60+
'Content-Length: 20\r\n' +
61+
'Connection: close\r\n\r\n' +
62+
'12345678901234567890\r\n\r\n'
63+
);
6264
}, common.platformTimeout(headersTimeout * 2)).unref();
6365
});
6466
}));
Collapse file

‎test/parallel/test-http-server-headers-timeout-interrupted-headers.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-server-headers-timeout-interrupted-headers.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ server.listen(0, common.mustCall(() => {
5252
}));
5353

5454
client.resume();
55-
client.write('GET / HTTP/1.1\r\n');
56-
client.write('Connection: close\r\n');
57-
client.write('X-CRASH: ');
55+
client.write(
56+
'GET / HTTP/1.1\r\n' +
57+
'Connection: close\r\n' +
58+
'X-CRASH: '
59+
);
5860

5961
sendDelayedRequestHeaders = common.mustCall(() => {
6062
setTimeout(() => {
Collapse file

‎test/parallel/test-http-server-request-timeout-delayed-body.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-server-request-timeout-delayed-body.js
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ server.listen(0, common.mustCall(() => {
5959
}));
6060

6161
client.resume();
62-
client.write('POST / HTTP/1.1\r\n');
63-
client.write('Host: example.com\r\n');
64-
client.write('Content-Length: 20\r\n');
65-
client.write('Connection: close\r\n');
66-
client.write('\r\n');
62+
client.write(
63+
'POST / HTTP/1.1\r\n' +
64+
'Host: example.com\r\n' +
65+
'Content-Length: 20\r\n' +
66+
'Connection: close\r\n\r\n'
67+
);
6768

6869
sendDelayedRequestBody = common.mustCall(() => {
6970
setTimeout(() => {
Collapse file

‎test/parallel/test-http-server-request-timeout-delayed-headers.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-server-request-timeout-delayed-headers.js
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ server.listen(0, common.mustCall(() => {
5050

5151
sendDelayedRequestHeaders = common.mustCall(() => {
5252
setTimeout(() => {
53-
client.write('POST / HTTP/1.1\r\n');
54-
client.write('Content-Length: 20\r\n');
55-
client.write('Connection: close\r\n\r\n');
56-
client.write('12345678901234567890\r\n\r\n');
53+
client.write(
54+
'POST / HTTP/1.1\r\n' +
55+
'Content-Length: 20\r\n' +
56+
'Connection: close\r\n\r\n' +
57+
'12345678901234567890\r\n\r\n'
58+
);
5759
}, common.platformTimeout(requestTimeout * 2)).unref();
5860
});
5961
}));
Collapse file

‎test/parallel/test-http-server-request-timeout-interrupted-body.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-server-request-timeout-interrupted-body.js
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ server.listen(0, common.mustCall(() => {
5959
}));
6060

6161
client.resume();
62-
client.write('POST / HTTP/1.1\r\n');
63-
client.write('Host: example.com\r\n');
64-
client.write('Content-Length: 20\r\n');
65-
client.write('Connection: close\r\n');
66-
client.write('\r\n');
67-
client.write('1234567890');
62+
client.write(
63+
'POST / HTTP/1.1\r\n' +
64+
'Host: example.com\r\n' +
65+
'Content-Length: 20\r\n' +
66+
'Connection: close\r\n\r\n' +
67+
'1234567890'
68+
);
6869

6970
sendDelayedRequestBody = common.mustCall(() => {
7071
setTimeout(() => {
Collapse file

‎test/parallel/test-http-server-request-timeout-interrupted-headers.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-server-request-timeout-interrupted-headers.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ server.listen(0, common.mustCall(() => {
4747
}));
4848

4949
client.resume();
50-
client.write('GET / HTTP/1.1\r\n');
51-
client.write('Connection: close\r\n');
52-
client.write('X-CRASH: ');
50+
client.write(
51+
'GET / HTTP/1.1\r\n' +
52+
'Connection: close\r\n' +
53+
'X-CRASH: '
54+
);
5355

5456
sendDelayedRequestHeaders = common.mustCall(() => {
5557
setTimeout(() => {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.