Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-1079

Liars in PrimitiveApiTest that promise to test api in compression mode, but don't do this actually

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.8.0
    • 0.8.2.0
    • core

    Description

      Long time ago (0.7) we had ByteBufferMessageSet as a part of api and it's allowed us to control compression. Times goes on and now PrimitiveApiTest have methods that promise to test api with compression enabled, but in fact they don't. Moreover this methods almost entirely copy their counterparts without compression. In particular I'm talking about `testProduceAndMultiFetch` / `testProduceAndMultiFetchWithCompression` and `testMultiProduce`/`testMultiProduceWithCompression` pairs.

      The fix could be super-easy and soundness – just parameterize methods with producer of each type (with/without compression). Sadly but it isn't feasible for junit3, so straightforward solution is to do the same ugly thing as `testDefaultEncoderProducerAndFetchWithCompression` method does – forget about class-wide producer and roll-out it's own. I will attach path if that is a problem indeed.

      Attachments

        1. testing-with-compression-producer.patch
          11 kB
          Kostya Golikov
        2. testing-with-compression-v2.patch
          11 kB
          Kostya Golikov

        Activity

          People

            omnomnom Kostya Golikov
            omnomnom Kostya Golikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: