Skip to content

Commit 65d4b44

Browse files
committed
Datagram Tests
1 parent ffdc82b commit 65d4b44

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

FlyingSocks/Tests/AsyncSocketTests.swift

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,21 +254,17 @@ struct AsyncSocketTests {
254254
#endif
255255

256256
@Test
257-
func testMessageSequence() async throws {
257+
func messageSequence_receives_messages() async throws {
258258
let (socket, port) = try await AsyncSocket.makeLoopbackDatagram()
259259
var messages = socket.messages
260260

261-
async let received = [messages.next(), messages.next()]
261+
async let received = messages.next()
262262

263263
let client = try await AsyncSocket.makeLoopbackDatagram().0
264264
try await client.sendString("Fish 🐡", to: .loopback(port: port))
265-
try await client.sendString("Chips 🍟", to: .loopback(port: port))
266265

267266
#expect(
268-
try await received.compactMap { try $0?.payloadString } == [
269-
"Fish 🐡",
270-
"Chips 🍟"
271-
]
267+
try await received?.payloadString == "Fish 🐡"
272268
)
273269
}
274270
}

0 commit comments

Comments
 (0)