Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10885

Refactor MemoryRecordsBuilderTest/MemoryRecordsTest to avoid a lot of (unnecessary) ignored test cases

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • None

    Description

      private void assumeAtLeastV2OrNotZstd(byte magic)
      Unknown macro: { assumeTrue(compressionType != CompressionType.ZSTD || magic >= MAGIC_VALUE_V2); }

      MemoryRecordsBuilderTest/MemoryRecordsTest use aforementioned method to avoid testing zstd on unsupported magic code. However, it produces some unnecessary ignored test cases. Personally, it could be separated to different test classes for each magic code as we do assign specify magic code to each test cases.
       
       

      Attachments

        Issue Links

          Activity

            People

              Geordie GeordieMai
              chia7712 Chia-Ping Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: