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

        Doug Cutting made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Douglas Creager made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Douglas Creager added a comment -

        Committed to SVN

        Show
        Douglas Creager added a comment - Committed to SVN
        Douglas Creager made changes -
        Field Original Value New Value
        Attachment 0001-AVRO-1039.-C-Don-t-try-to-use-nonexistent-codecs-in-.patch [ 12516641 ]
        Hide
        Douglas Creager added a comment -

        The null codec is always present, so we can fall back on that if we didn't build the deflate codec. And we've already got preprocessor macros that we can check to see whether each particular codec is present.

        Show
        Douglas Creager added a comment - The null codec is always present, so we can fall back on that if we didn't build the deflate codec. And we've already got preprocessor macros that we can check to see whether each particular codec is present.
        Vivek Nadkarni created issue -

          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