You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Kengo Seki (JIRA)" <ji...@apache.org> on 2019/05/14 00:04:00 UTC

[jira] [Created] (KAFKA-8361) Fix ConsumerPerformanceTest#testNonDetailedHeaderMatchBody to test a real ConsumerPerformance's method

Kengo Seki created KAFKA-8361:
---------------------------------

             Summary: Fix ConsumerPerformanceTest#testNonDetailedHeaderMatchBody to test a real ConsumerPerformance's method
                 Key: KAFKA-8361
                 URL: https://issues.apache.org/jira/browse/KAFKA-8361
             Project: Kafka
          Issue Type: Improvement
          Components: unit tests
            Reporter: Kengo Seki
            Assignee: Kengo Seki


{{kafka.tools.ConsumerPerformanceTest#testNonDetailedHeaderMatchBody}} doesn't work as a regression test for now, since it tests an anonymous function defined in the test method itself.
{code:java}
  @Test
  def testNonDetailedHeaderMatchBody(): Unit = {
    testHeaderMatchContent(detailed = false, 2, () => println(s"${dateFormat.format(System.currentTimeMillis)}, " +
      s"${dateFormat.format(System.currentTimeMillis)}, 1.0, 1.0, 1, 1.0, 1, 1, 1.1, 1.1"))
  }
{code}
It should test a real {{ConsumerPerformance}}'s method, just like {{testDetailedHeaderMatchBody}}.
{code:java}
  @Test
  def testDetailedHeaderMatchBody(): Unit = {
    testHeaderMatchContent(detailed = true, 2,
      () => ConsumerPerformance.printConsumerProgress(1, 1024 * 1024, 0, 1, 0, 0, 1, dateFormat, 1L))
  }
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)