@@ -70,7 +70,7 @@ final class BidirectionalRelayTests {
7070 totalRead += n
7171 } else if n == - 1 && ( errno == EAGAIN || errno == EWOULDBLOCK) {
7272 // Not ready yet, brief sleep before retry.
73- usleep ( 1000 ) // 1ms
73+ usleep ( 1000 ) // 1ms
7474 } else {
7575 break
7676 }
@@ -137,8 +137,10 @@ final class BidirectionalRelayTests {
137137 let ( d0, d1) = try makeSocketPair ( )
138138
139139 defer {
140- close ( a0) ; close ( b1)
141- close ( c0) ; close ( d1)
140+ close ( a0)
141+ close ( b1)
142+ close ( c0)
143+ close ( d1)
142144 }
143145
144146 // Shrink send buffers to make them fill quickly.
@@ -159,10 +161,10 @@ final class BidirectionalRelayTests {
159161 _ = largeData. withUnsafeBufferPointer { buf in
160162 write ( a0, buf. baseAddress!, buf. count)
161163 }
162- _ = fcntl ( a0, F_SETFL, a0flags) // restore
164+ _ = fcntl ( a0, F_SETFL, a0flags) // restore
163165
164166 // Give relay1 time to process and get blocked.
165- usleep ( 100_000 ) // 100ms
167+ usleep ( 100_000 ) // 100ms
166168
167169 // Now test relay2: it should still work despite relay1 being backpressured.
168170 let testData : [ UInt8 ] = Array ( " relay2 works! " . utf8)
@@ -274,7 +276,7 @@ final class BidirectionalRelayTests {
274276 return true
275277 }
276278 group. addTask {
277- try ? await Task . sleep ( nanoseconds: 3_000_000_000 ) // 3 seconds
279+ try ? await Task . sleep ( nanoseconds: 3_000_000_000 ) // 3 seconds
278280 return false
279281 }
280282 let result = await group. next ( ) !
@@ -310,7 +312,7 @@ final class BidirectionalRelayTests {
310312 }
311313
312314 // Give relay time to enter backpressure state (readSource suspended).
313- usleep ( 100_000 ) // 100ms
315+ usleep ( 100_000 ) // 100ms
314316
315317 // Stop the relay while it's backpressured. This should not hang or leak.
316318 relay. stop ( )
@@ -326,7 +328,7 @@ final class BidirectionalRelayTests {
326328 return true
327329 }
328330 group. addTask {
329- try ? await Task . sleep ( nanoseconds: 3_000_000_000 ) // 3 seconds
331+ try ? await Task . sleep ( nanoseconds: 3_000_000_000 ) // 3 seconds
330332 return false
331333 }
332334 let result = await group. next ( ) !
0 commit comments