Polishing
This commit is contained in:
@@ -27,9 +27,8 @@ import org.springframework.messaging.Message;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
|
||||
/**
|
||||
* Unit tests for {@link BufferingStompDecoder}..
|
||||
* Unit tests for {@link BufferingStompDecoder}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.0.3
|
||||
@@ -54,7 +53,6 @@ public class BufferingStompDecoderTests {
|
||||
|
||||
@Test
|
||||
public void oneMessageInTwoChunks() throws InterruptedException {
|
||||
|
||||
BufferingStompDecoder stompDecoder = new BufferingStompDecoder(128);
|
||||
String chunk1 = "SEND\na:alpha\n\nMessage";
|
||||
String chunk2 = " body\0";
|
||||
@@ -86,9 +84,8 @@ public class BufferingStompDecoderTests {
|
||||
|
||||
@Test
|
||||
public void oneFullAndOneSplitMessageContentLength() throws InterruptedException {
|
||||
int contentLength = "Payload2a-Payload2b".getBytes().length;
|
||||
|
||||
BufferingStompDecoder stompDecoder = new BufferingStompDecoder(128);
|
||||
int contentLength = "Payload2a-Payload2b".getBytes().length;
|
||||
String chunk1 = "SEND\na:alpha\n\nPayload1\0SEND\ncontent-length:" + contentLength + "\n";
|
||||
List<Message<byte[]>> messages = stompDecoder.decode(toByteBuffer(chunk1));
|
||||
|
||||
@@ -165,7 +162,7 @@ public class BufferingStompDecoderTests {
|
||||
}
|
||||
|
||||
@Test(expected = StompConversionException.class)
|
||||
public void bufferSizeLimit() throws InterruptedException {
|
||||
public void bufferSizeLimit() {
|
||||
BufferingStompDecoder stompDecoder = new BufferingStompDecoder(10);
|
||||
String payload = "SEND\na:alpha\n\nMessage body";
|
||||
stompDecoder.decode(toByteBuffer(payload));
|
||||
|
||||
Reference in New Issue
Block a user