You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2019/03/27 11:33:45 UTC
[qpid-proton-j] branch master updated: PROTON-1998: use a small
test payload to minimise size of log output
This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton-j.git
The following commit(s) were added to refs/heads/master by this push:
new ee02857 PROTON-1998: use a small test payload to minimise size of log output
ee02857 is described below
commit ee02857944b9fd203d4cb72f2da6821192ed27f4
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Wed Mar 27 10:58:11 2019 +0000
PROTON-1998: use a small test payload to minimise size of log output
---
.../org/apache/qpid/proton/engine/impl/FrameWriterTest.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/proton-j/src/test/java/org/apache/qpid/proton/engine/impl/FrameWriterTest.java b/proton-j/src/test/java/org/apache/qpid/proton/engine/impl/FrameWriterTest.java
index e392e85..dd93304 100644
--- a/proton-j/src/test/java/org/apache/qpid/proton/engine/impl/FrameWriterTest.java
+++ b/proton-j/src/test/java/org/apache/qpid/proton/engine/impl/FrameWriterTest.java
@@ -61,6 +61,7 @@ public class FrameWriterTest {
private final EncoderImpl encoder = new EncoderImpl(decoder);
private ReadableBuffer bigPayload;
+ private ReadableBuffer littlePayload;
private ByteBuffer buffer;
@Before
@@ -77,6 +78,11 @@ public class FrameWriterTest {
for (int i = 0; i < bigPayload.remaining(); ++i) {
bigPayload.array()[i] = (byte) random.nextInt(127);
}
+
+ littlePayload = ReadableBuffer.ByteBufferReader.allocate(16);
+ for (int i = 0; i < littlePayload.remaining(); ++i) {
+ littlePayload.array()[i] = (byte) random.nextInt(127);
+ }
}
@Test
@@ -298,9 +304,9 @@ public class FrameWriterTest {
FrameWriter framer = new FrameWriter(encoder, Integer.MAX_VALUE, (byte) 0, spy);
int channel = 16;
- int payloadLength = bigPayload.capacity();
+ int payloadLength = littlePayload.capacity();
- framer.writeFrame(channel, transfer, bigPayload, new PartialTransferHandler(transfer));
+ framer.writeFrame(channel, transfer, littlePayload, new PartialTransferHandler(transfer));
ArgumentCaptor<TransportFrame> frameCatcher = ArgumentCaptor.forClass(TransportFrame.class);
Mockito.verify(spy).log(eq(TransportImpl.OUTGOING), frameCatcher.capture());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org