Commit cd98f5d
test: fix flaky test-http-set-timeout-server
It can happen that the connection and server is closed before the second
reponse has been processed by server. In this case, the
`res.setTimeout()` callback will never be called causing the test to
fail. Fix this by only closing the connection and server when the 2nd
has been received.
PR-URL: #11790
Fixes: #11768
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>1 parent 0e13887 commit cd98f5dCopy full SHA for cd98f5d
File tree
Expand file treeCollapse file tree
1 file changed
+8
-3
lines changedOpen diff view settings
Filter options
- test/parallel
Expand file treeCollapse file tree
1 file changed
+8
-3
lines changedOpen diff view settings
Collapse file
test/parallel/test-http-set-timeout-server.js
Copy file name to clipboardExpand all lines: test/parallel/test-http-set-timeout-server.js+8-3Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
117 | 117 | |
118 | 118 | |
119 | 119 | |
| 120 | + |
120 | 121 | |
121 | 122 | |
122 | 123 | |
123 | 124 | |
| 125 | + |
| 126 | + |
124 | 127 | |
125 | 128 | |
126 | 129 | |
127 | 130 | |
128 | 131 | |
129 | 132 | |
130 | 133 | |
131 | | - |
132 | | - |
133 | | - |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
134 | 139 | |
135 | 140 | |
136 | 141 | |
|
0 commit comments