kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kengo Seki (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-8361) Fix ConsumerPerformanceTest#testNonDetailedHeaderMatchBody to test a real ConsumerPerformance's method
Date Tue, 14 May 2019 00:04:00 GMT
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)

Mime
View raw message