Use text block where feasible
See gh-31916
This commit is contained in:
committed by
Stéphane Nicoll
parent
9d31537ae5
commit
a35384fd57
@@ -28,10 +28,16 @@ public class OuterSample {
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\014sample.proto\",\n\003Msg\022\013\n\003foo\030\001 \001(\t\022\030\n\004bl" +
|
||||
"ah\030\002 \001(\0132\n.SecondMsg\"\031\n\tSecondMsg\022\014\n\004bla" +
|
||||
"h\030\001 \001(\005B-\n\034org.springframework.protobufB" +
|
||||
"\013OuterSampleP\001"
|
||||
"""
|
||||
|
||||
\014sample.proto",
|
||||
\003Msg\022\013
|
||||
\003foo\030\001 \001(\t\022\030
|
||||
\004blah\030\002 \001(\0132
|
||||
.SecondMsg"\031
|
||||
\tSecondMsg\022\014
|
||||
\004blah\030\001 \001(\005B-
|
||||
\034org.springframework.protobufB\013OuterSampleP\001"""
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
|
||||
@@ -72,7 +72,14 @@ public class BufferingStompDecoderTests {
|
||||
@Test
|
||||
public void twoMessagesInOneChunk() throws InterruptedException {
|
||||
BufferingStompDecoder stompDecoder = new BufferingStompDecoder(STOMP_DECODER, 128);
|
||||
String chunk = "SEND\na:alpha\n\nPayload1\0" + "SEND\na:alpha\n\nPayload2\0";
|
||||
String chunk = """
|
||||
SEND
|
||||
a:alpha
|
||||
|
||||
Payload1\0SEND
|
||||
a:alpha
|
||||
|
||||
Payload2\0""";
|
||||
List<Message<byte[]>> messages = stompDecoder.decode(toByteBuffer(chunk));
|
||||
|
||||
assertThat(messages).hasSize(2);
|
||||
|
||||
Reference in New Issue
Block a user