From 0adc938bc8de3d3829b842f9767d81c7480b8403 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Tue, 22 May 2018 16:41:17 +0100 Subject: [PATCH] Flush embedded channel. (#15) Motivation: apple/swift-nio#421 changed the behaviour of EmbeddedChannel to no longer automatically succeed write promises without flushes. This is a reasonable behavioural change, but broke a test that was working around but still implicitly relied on the old behaviour. Modifications: Add the missing flushes. Result: This test will pass both on NIO master and NIO 1.7.0 --- Tests/NIOOpenSSLTests/OpenSSLIntegrationTest.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/NIOOpenSSLTests/OpenSSLIntegrationTest.swift b/Tests/NIOOpenSSLTests/OpenSSLIntegrationTest.swift index 346adcbc..5eb50a42 100644 --- a/Tests/NIOOpenSSLTests/OpenSSLIntegrationTest.swift +++ b/Tests/NIOOpenSSLTests/OpenSSLIntegrationTest.swift @@ -215,7 +215,7 @@ private class WriteDelayHandler: ChannelOutboundHandler { func forceFlush() { let writes = self.writes self.writes = [] - writes.forEach { $0.0.write($0.1, promise: $0.2) } + writes.forEach { $0.0.writeAndFlush($0.1, promise: $0.2) } } }