Wait for test cleanup. (#280)
Wait for test cleanup. (#280)

Motivation:

The current test function does not wait for the futures from close to
return, and so they may in principle be leaked. This obscures errors that
the test might hit with precondition failures.

Modifications:

Changed the defer statements to wait for the futures.

Result:

Fewer spurious test failures.
apple/swift-nio,apple/swift-nio,apple/swift-nio,apple/swift-nio,apple/swift-nio