@@ -16,12 +16,12 @@ const autoSelectFamilyAttemptTimeout = common.defaultAutoSelectFamilyAttemptTime
1616
1717// Test that IPV4 is reached if IPV6 is not reachable
1818{
19- const ipv4Server = createServer ( ( socket ) => {
19+ const ipv4Server = createServer ( common . mustCall ( ( socket ) => {
2020 socket . on ( 'data' , common . mustCall ( ( ) => {
2121 socket . write ( 'response-ipv4' ) ;
2222 socket . end ( ) ;
2323 } ) ) ;
24- } ) ;
24+ } ) ) ;
2525
2626 ipv4Server . listen ( 0 , '127.0.0.1' , common . mustCall ( ( ) => {
2727 const port = ipv4Server . address ( ) . port ;
@@ -56,12 +56,12 @@ const autoSelectFamilyAttemptTimeout = common.defaultAutoSelectFamilyAttemptTime
5656
5757// Test that only the last successful connection is established.
5858{
59- const ipv4Server = createServer ( ( socket ) => {
59+ const ipv4Server = createServer ( common . mustCall ( ( socket ) => {
6060 socket . on ( 'data' , common . mustCall ( ( ) => {
6161 socket . write ( 'response-ipv4' ) ;
6262 socket . end ( ) ;
6363 } ) ) ;
64- } ) ;
64+ } ) ) ;
6565
6666 ipv4Server . listen ( 0 , '127.0.0.1' , common . mustCall ( ( ) => {
6767 const port = ipv4Server . address ( ) . port ;
@@ -116,12 +116,12 @@ if (common.hasIPv6) {
116116 } ) ) ;
117117 } ) ;
118118
119- const ipv6Server = createServer ( ( socket ) => {
119+ const ipv6Server = createServer ( common . mustCall ( ( socket ) => {
120120 socket . on ( 'data' , common . mustCall ( ( ) => {
121121 socket . write ( 'response-ipv6' ) ;
122122 socket . end ( ) ;
123123 } ) ) ;
124- } ) ;
124+ } ) ) ;
125125
126126 ipv4Server . listen ( 0 , '127.0.0.1' , common . mustCall ( ( ) => {
127127 const port = ipv4Server . address ( ) . port ;
@@ -184,12 +184,12 @@ if (common.hasIPv6) {
184184
185185// Test that the option can be disabled
186186{
187- const ipv4Server = createServer ( ( socket ) => {
187+ const ipv4Server = createServer ( common . mustCallAtLeast ( ( socket ) => {
188188 socket . on ( 'data' , common . mustCall ( ( ) => {
189189 socket . write ( 'response-ipv4' ) ;
190190 socket . end ( ) ;
191191 } ) ) ;
192- } ) ;
192+ } , 0 ) ) ;
193193
194194 ipv4Server . listen ( 0 , '127.0.0.1' , common . mustCall ( ( ) => {
195195 const port = ipv4Server . address ( ) . port ;
0 commit comments