public class CompressedPacketSenderTest extends PacketSenderTestBase
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
CompressedPacketSenderTest.CompressedPackets
Test utility to transform a buffer containing compressed packets into a sequence of payloads.
|
| Modifier and Type | Field and Description |
|---|---|
private java.io.ByteArrayOutputStream |
outputStream |
private MessageSender<NativePacketPayload> |
sender |
| Constructor and Description |
|---|
CompressedPacketSenderTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
basicCompressedPacketTest() |
void |
basicTwoPartSplitPacketTest()
Test the situation where a single packet is split into two and the second part doesn't exceed the capacity of the second compressed packet.
|
void |
cleanupByteArrayOutputStream() |
void |
incompressiblePacketsArentCompressed() |
void |
smallPacketsArentCompressed() |
void |
twoPacketToThreeCompressedPacketNoBoundary()
Test the situation where a single packet is split into two and the second part exceeds the capacity of the second compressed packet requiring a third
compressed packet.
|
void |
twoPacketToThreeWithEmptyUncompressedPacket()
This tests that the splitting of MySQL packets includes an additional empty packet to signal the end of the multi-packet sequence.
|
checkSequentiallyFilledPacket, fillPacketSequentially, getNoopPacketSenderprivate java.io.ByteArrayOutputStream outputStream
private MessageSender<NativePacketPayload> sender
@AfterEach public void cleanupByteArrayOutputStream()
@Test
public void basicCompressedPacketTest()
throws java.io.IOException
java.io.IOException@Test
public void basicTwoPartSplitPacketTest()
throws java.io.IOException
java.io.IOException@Test
public void twoPacketToThreeCompressedPacketNoBoundary()
throws java.io.IOException
java.io.IOException@Test
public void twoPacketToThreeWithEmptyUncompressedPacket()
throws java.io.IOException
java.io.IOException@Test
public void smallPacketsArentCompressed()
throws java.io.IOException
java.io.IOException@Test
public void incompressiblePacketsArentCompressed()
throws java.io.IOException
java.io.IOException