Class ChunkedBytesStreamTest

java.lang.Object
org.apache.kafka.common.utils.internals.ChunkedBytesStreamTest

public class ChunkedBytesStreamTest extends Object
  • Constructor Details

    • ChunkedBytesStreamTest

      public ChunkedBytesStreamTest()
  • Method Details

    • testEofErrorForMethodReadFully

      @Test public void testEofErrorForMethodReadFully() throws IOException
      Throws:
      IOException
    • testCorrectnessForMethodReadFully

      @ParameterizedTest @MethodSource("provideSourceBytebuffersForTest") public void testCorrectnessForMethodReadFully(ByteBuffer input) throws IOException
      Throws:
      IOException
    • testInvalidInputsForMethodRead

      @ParameterizedTest @MethodSource("provideCasesWithInvalidInputsForMethodRead") public void testInvalidInputsForMethodRead(byte[] b, int off, int len) throws IOException
      Throws:
      IOException
    • testCorrectnessForMethodReadByte

      @ParameterizedTest @MethodSource("provideSourceBytebuffersForTest") public void testCorrectnessForMethodReadByte(ByteBuffer input) throws IOException
      Throws:
      IOException
    • testCorrectnessForMethodRead

      @ParameterizedTest @MethodSource("provideSourceBytebuffersForTest") public void testCorrectnessForMethodRead(ByteBuffer inputBuf) throws IOException
      Throws:
      IOException
    • testEndOfFileForMethodRead

      @Test public void testEndOfFileForMethodRead() throws IOException
      Throws:
      IOException
    • testEndOfSourceForMethodSkip

      @ParameterizedTest @ValueSource(booleans={true,false}) public void testEndOfSourceForMethodSkip(boolean pushSkipToSourceStream) throws IOException
      Throws:
      IOException
    • testCorrectnessForMethodSkip

      @ParameterizedTest @MethodSource("provideSourceSkipValuesForTest") public void testCorrectnessForMethodSkip(int bytesToPreRead, ByteBuffer inputBuf, int numBytesToSkip, boolean pushSkipToSourceStream) throws IOException
      Throws:
      IOException
    • testEdgeCaseInputForMethodSkip

      @ParameterizedTest @MethodSource("provideEdgeCaseInputForMethodSkip") public void testEdgeCaseInputForMethodSkip(int bufferLength, long toSkip, boolean delegateSkipToSourceStream, long expected) throws IOException
      Throws:
      IOException