Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2245

Java codec testing improvements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.9.0
    • java
    • None

    Description

      In the Avro Java implementation, TestBZip2Codec and TestZstandardCodec are both laughably wrong.

      For example, the last lines of TestBZip2Codec:

      byte[] outputByteArray = decompressedBuffer.array();
      for (int i = 0; i < inputByteSize; i++) {
        inputByteArray[i] = outputByteArray[i];
      }
      

      There should be an assertEquals in there not an assignment statement. (And if you put assertEquals there, the test actually fails...).

      I will send a PR that replaces these tests with a correct parametrized test for all codecs.

      Attachments

        Issue Links

          Activity

            People

              jtolar Jacob Tolar
              jtolar Jacob Tolar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: