Avro
  1. Avro
  2. AVRO-1287

Interop tests should test codecs as well

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.4
    • Fix Version/s: 1.7.5
    • Component/s: build
    • Labels:
      None

      Description

      Currently the interop tests for data files only generate and parse a data file with null codec in each language. Given that the deflate codec is also a required codec in the spec, we should be testing interop on deflate (and optionally snappy, too).

      1. AVRO-1287.patch
        5 kB
        Martin Kleppmann

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          Integrated in AvroJava #361 (See https://builds.apache.org/job/AvroJava/361/)
          AVRO-1287. Add data file with deflate codec to the interoperability test suite. (Revision 1467548)

          Result = SUCCESS
          martinkl :
          Files :

          • /avro/trunk/CHANGES.txt
          • /avro/trunk/build.sh
          • /avro/trunk/lang/java/avro/pom.xml
          • /avro/trunk/lang/java/avro/src/test/java/org/apache/avro/RandomData.java
          • /avro/trunk/lang/php/test/InterOpTest.php
          • /avro/trunk/lang/ruby/interop/test_interop.rb
          Show
          Hudson added a comment - Integrated in AvroJava #361 (See https://builds.apache.org/job/AvroJava/361/ ) AVRO-1287 . Add data file with deflate codec to the interoperability test suite. (Revision 1467548) Result = SUCCESS martinkl : Files : /avro/trunk/CHANGES.txt /avro/trunk/build.sh /avro/trunk/lang/java/avro/pom.xml /avro/trunk/lang/java/avro/src/test/java/org/apache/avro/RandomData.java /avro/trunk/lang/php/test/InterOpTest.php /avro/trunk/lang/ruby/interop/test_interop.rb
          Hide
          Martin Kleppmann added a comment -

          Thanks for the review Doug. I committed this (r1467548), including your change to ignore deflate data files in the PHP test suite, and a similar change to ignore deflate in Ruby. This keeps the interop test suite passing on this commit.

          I will shortly commit deflate support for Ruby (AVRO-1288) and undo the ignoring of deflated files in Ruby.

          Show
          Martin Kleppmann added a comment - Thanks for the review Doug. I committed this (r1467548), including your change to ignore deflate data files in the PHP test suite, and a similar change to ignore deflate in Ruby. This keeps the interop test suite passing on this commit. I will shortly commit deflate support for Ruby ( AVRO-1288 ) and undo the ignoring of deflated files in Ruby.
          Hide
          Doug Cutting added a comment -

          This looks like a fine way to add this into the build, but it causes PHP tests to fail.

          If I update the regex in InterOpTest.php as follows:

          -      if (0 < preg_match('/.*\.avro$/', $file))
          +      if (0 < preg_match('/^[a-z]+\.avro$/', $file))
          

          then tests pass.

          Show
          Doug Cutting added a comment - This looks like a fine way to add this into the build, but it causes PHP tests to fail. If I update the regex in InterOpTest.php as follows: - if (0 < preg_match('/.*\.avro$/', $file)) + if (0 < preg_match('/^[a-z]+\.avro$/', $file)) then tests pass.
          Hide
          Martin Kleppmann added a comment -

          Would someone who knows their way around Maven be able to review this? Not sure if the way I've integrated this into the build is sane.

          Show
          Martin Kleppmann added a comment - Would someone who knows their way around Maven be able to review this? Not sure if the way I've integrated this into the build is sane.
          Hide
          Martin Kleppmann added a comment -

          Attached is a start at this: making the Java implementation generate an example data file with deflate codec as well as the existing one with null codec.

          This deflate passes the interop tests for Java, Python and C. I've not been able to test PHP. It fails on Ruby, since the Ruby implementation doesn't yet support deflate; I've created AVRO-1288 for that.

          Show
          Martin Kleppmann added a comment - Attached is a start at this: making the Java implementation generate an example data file with deflate codec as well as the existing one with null codec. This deflate passes the interop tests for Java, Python and C. I've not been able to test PHP. It fails on Ruby, since the Ruby implementation doesn't yet support deflate; I've created AVRO-1288 for that.

            People

            • Assignee:
              Martin Kleppmann
              Reporter:
              Martin Kleppmann
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development