Class TaggedFieldReaderTestPBT

java.lang.Object
org.apache.kafka.common.message.TaggedFieldReaderTestPBT

@Tag("propertybased") public class TaggedFieldReaderTestPBT extends Object
Property-based tests for the tagged-field guards in the generated read() path (see
invalid reference
MessageDataGeneratorTest
for the code-generation-level assertions and MessageTest for the example-based cases). A non-conforming sender must not be able to force disproportionate heap allocation by declaring a tagged-field count the buffer cannot back.
  • Constructor Details

    • TaggedFieldReaderTestPBT

      public TaggedFieldReaderTestPBT()
  • Method Details

    • declaredCountExceedingRemainingBytesIsAlwaysRejected

      @Property public void declaredCountExceedingRemainingBytesIsAlwaysRejected(@ForAll("smallByteCount") int suppliedBytes, @ForAll("positiveExcess") int excess)
    • declaredCountExceedingHardCapIsAlwaysRejected

      @Property public void declaredCountExceedingHardCapIsAlwaysRejected(@ForAll("excessOverHardCap") int excess)