@@ -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 ) => {
2020socket . on ( 'data' , common . mustCall ( ( ) => {
2121socket . write ( 'response-ipv4' ) ;
2222socket . end ( ) ;
2323} ) ) ;
24- } ) ;
24+ } ) ) ;
2525
2626ipv4Server . listen ( 0 , '127.0.0.1' , common . mustCall ( ( ) => {
2727const 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 ) => {
6060socket . on ( 'data' , common . mustCall ( ( ) => {
6161socket . write ( 'response-ipv4' ) ;
6262socket . end ( ) ;
6363} ) ) ;
64- } ) ;
64+ } ) ) ;
6565
6666ipv4Server . listen ( 0 , '127.0.0.1' , common . mustCall ( ( ) => {
6767const 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 ) => {
120120socket . on ( 'data' , common . mustCall ( ( ) => {
121121socket . write ( 'response-ipv6' ) ;
122122socket . end ( ) ;
123123} ) ) ;
124- } ) ;
124+ } ) ) ;
125125
126126ipv4Server . listen ( 0 , '127.0.0.1' , common . mustCall ( ( ) => {
127127const 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 ) => {
188188socket . on ( 'data' , common . mustCall ( ( ) => {
189189socket . write ( 'response-ipv4' ) ;
190190socket . end ( ) ;
191191} ) ) ;
192- } ) ;
192+ } , 0 ) ) ;
193193
194194ipv4Server . listen ( 0 , '127.0.0.1' , common . mustCall ( ( ) => {
195195const port = ipv4Server . address ( ) . port ;
0 commit comments