Synchronized lazy start in JettyRequestUpgradeStrategy

Issue: SPR-14527
This commit is contained in:
Rossen Stoyanchev
2016-12-12 21:01:49 -05:00
parent 75422787b6
commit 885e76bdd0
3 changed files with 56 additions and 38 deletions

View File

@@ -66,7 +66,7 @@ public abstract class AbstractWebSocketHandlerIntegrationTests {
public Class<?> handlerAdapterConfigClass;
@Parameters
@Parameters(name = "server [{0}]")
public static Object[][] arguments() {
File base = new File(System.getProperty("java.io.tmpdir"));
return new Object[][] {

View File

@@ -20,7 +20,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
import io.netty.handler.codec.http.websocketx.WebSocketFrame;
import io.reactivex.netty.protocol.http.client.HttpClient;
@@ -66,7 +65,11 @@ public class BasicWebSocketHandlerIntegrationTests extends AbstractWebSocketHand
.mergeWith(conn.getInput())
)
.take(10)
.map(frame -> frame.content().toString(StandardCharsets.UTF_8))
.map(frame -> {
String text = frame.content().toString(StandardCharsets.UTF_8);
frame.release();
return text;
})
.toList().toBlocking().first();
List<String> expected = messages.toList().toBlocking().first();
assertEquals(expected, actual);