Commit 8872840
test: refactor test-dgram-send-callback-recursive
Just send 10 messages recursively and check that the send calls are
asynchronous by asserting that a `setImmediate` callback has been called
in-between. It avoids a race condition in the test when the recursive
limit is reached without having received at least 10 messages.
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #50791 parent dff01d1 commit 8872840Copy full SHA for 8872840
File tree
Expand file treeCollapse file tree
1 file changed
+10
-8
lines changedOpen diff view settings
Filter options
- test/parallel
Expand file treeCollapse file tree
1 file changed
+10
-8
lines changedOpen diff view settings
Collapse file
test/parallel/test-dgram-send-callback-recursive.js
Copy file name to clipboardExpand all lines: test/parallel/test-dgram-send-callback-recursive.js+10-8Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
5 | 5 | |
6 | 6 | |
7 | 7 | |
8 | | - |
9 | | - |
| 8 | + |
| 9 | + |
10 | 10 | |
11 | | - |
| 11 | + |
12 | 12 | |
13 | 13 | |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
| 14 | + |
18 | 15 | |
19 | 16 | |
| 17 | + |
| 18 | + |
20 | 19 | |
21 | | - |
22 | 20 | |
23 | 21 | |
24 | 22 | |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
25 | 27 | |
26 | 28 | |
27 | 29 | |
|
0 commit comments