Commit a92be13
test: improve control flow in test-tls-dhe
If this test fails, e.g., if the s_client output does not match the
expectation, the previous implementation would not produce any helpful
error messages. Rework the control flow to be more idiomatic. Avoid
callback chaining and stream operations.
Also, the TLS server 'close' event does not pass an error to the event
handler, so remove the respective assertion.
PR-URL: #46751
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 81592ff commit a92be13Copy full SHA for a92be13
File tree
Expand file treeCollapse file tree
1 file changed
+21
-54
lines changedOpen diff view settings
Filter options
- test/parallel
Expand file treeCollapse file tree
1 file changed
+21
-54
lines changedOpen diff view settings
Collapse file
test/parallel/test-tls-dhe.js
Copy file name to clipboardExpand all lines: test/parallel/test-tls-dhe.js+21-54Lines changed: 21 additions & 54 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
| 32 | + |
32 | 33 | |
33 | | - |
| 34 | + |
34 | 35 | |
35 | 36 | |
36 | 37 | |
37 | 38 | |
38 | | - |
39 | | - |
40 | 39 | |
41 | 40 | |
42 | 41 | |
| ||
48 | 47 | |
49 | 48 | |
50 | 49 | |
51 | | - |
| 50 | + |
52 | 51 | |
53 | 52 | |
54 | 53 | |
| ||
57 | 56 | |
58 | 57 | |
59 | 58 | |
60 | | - |
61 | | - |
62 | | - |
| 59 | + |
63 | 60 | |
64 | | - |
65 | | - |
66 | | - |
67 | | - |
68 | | - |
69 | | - |
70 | | - |
| 61 | + |
| 62 | + |
71 | 63 | |
72 | 64 | |
73 | | - |
74 | | - |
75 | | - |
76 | | - |
77 | | - |
78 | | - |
79 | | - |
| 65 | + |
80 | 66 | |
81 | | - |
82 | | - |
83 | | - |
84 | | - |
85 | | - |
86 | | - |
87 | | - |
88 | | - |
89 | | - |
90 | | - |
91 | | - |
92 | | - |
93 | | - |
94 | | - |
95 | | - |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
96 | 72 | |
97 | | - |
98 | | - |
99 | | - |
| 73 | + |
100 | 74 | |
101 | 75 | |
102 | | - |
103 | | - |
104 | | - |
105 | | - |
106 | | - |
107 | | - |
108 | | - |
109 | | - |
110 | | - |
111 | | - |
112 | | - |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
113 | 80 | |
114 | | - |
115 | | - |
116 | | - |
117 | | - |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
0 commit comments