mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Fix warnings in tests. (#193)
Motivation: When running swift test two warnings were printed. Modifications: - Signal that we want to ignore the return value - Use boolean test in the while loop Result: Cleaner build
This commit is contained in:
1 parent
58a9651d90
commit
b6dbaa584e
2 files changed
+2
-2
No files matched your search
@@ -317,7 +317,7 @@ class ChannelNotificationTest: XCTestCase {
|
||||
buffer.write(string: "test")
|
||||
|
||||
|
||||
while let result = try? channel.writeAndFlush(buffer).wait() {
|
||||
while (try? channel.writeAndFlush(buffer).wait()) != nil {
|
||||
// Just write in a loop until it fails to ensure we detect the closed connection in a timely manner.
|
||||
}
|
||||
try channel.closeFuture.wait()
|
||||
|
||||
@@ -300,7 +300,7 @@ public class EmbeddedEventLoopTest: XCTestCase {
|
||||
}
|
||||
|
||||
// Finally schedule a task for 10ns.
|
||||
loop.scheduleTask(in: .nanoseconds(10)) {
|
||||
_ = loop.scheduleTask(in: .nanoseconds(10)) {
|
||||
XCTAssertEqual(orderingCounter, 5)
|
||||
orderingCounter = 6
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user