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:
Norman Maurer authored and GitHub committed 2018-03-19 19:36:10 +01:00
1 parent 58a9651d90
commit b6dbaa584e
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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
}