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

Avro-C: Test 1 (quickstop) requires deflate codec, and fails when it is missing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.6.2
    • 1.6.3
    • c
    • None
    • GNU/Linux Ubuntu 11.10 64-bit

    Description

      Summary:

      The test/example quickstop requires the deflate codec. However, the deflate codec is an optional codec, and not a requirement for Avro-C. So the tests should pass even when the deflate codec is unavailable.

      Not sure of the best way to test features dependent on optional libraries, and (a) pass the tests when the optional libraries are not available, but (b) fail the tests when the libraries are available, but the code doesn't work properly.

      Details:

      When I make Avro-C using the following commands from the avro-trunk/lang/c directory:

      mkdir -p build
      cd build
      cmake .. -DCMAKE_INSTALL_PREFIX=avrolib -DCMAKE_BUILD_TYPE=Debug
      make
      make test
      make install

      I get the following messages (as expected, since I don't have the libs):
      <snip>
      – Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
      Disabled deflate codec. zlib not found.
      – checking for module 'liblzma'
      – package 'liblzma' not found
      Disabled lzma codec. liblzma not found.
      <snip>

      But then, during the tests, I get the error:
      1/10 Test #1: quickstop ........................***Failed 0.00 sec

      And, when I run quickstop manually:
      ~/avro-trunk/lang/c/build/examples$ ./quickstop
      There was an error creating quickstop.db
      error message: Unknown codec deflate

      Cheers,
      Vivek

      Attachments

        Activity

          People

            Unassigned Unassigned
            vnadkarni Vivek Nadkarni
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 168h
                168h
                Remaining:
                Remaining Estimate - 168h
                168h
                Logged:
                Time Spent - Not Specified
                Not Specified