Avro
  1. Avro
  2. AVRO-1039

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.6.3
    • Component/s: c
    • Labels:
      None
    • Environment:

      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

        Activity

        Vivek Nadkarni created issue -
        Douglas Creager made changes -
        Field Original Value New Value
        Attachment 0001-AVRO-1039.-C-Don-t-try-to-use-nonexistent-codecs-in-.patch [ 12516641 ]
        Douglas Creager made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Doug Cutting made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            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

                Development