Skip to content

KAFKA-7989: RequestQuotaTest should wait for quota config change before running tests#6482

Merged
rajinisivaram merged 1 commit intoapache:trunkfrom
apovzner:kafka-7989
Mar 21, 2019
Merged

KAFKA-7989: RequestQuotaTest should wait for quota config change before running tests#6482
rajinisivaram merged 1 commit intoapache:trunkfrom
apovzner:kafka-7989

Conversation

@apovzner
Copy link
Copy Markdown
Contributor

@apovzner apovzner commented Mar 21, 2019

This PR fixes KAFKA-7989 and KAFKA-8123: testResponseThrottleTimeWhenBothProduceAndRequestQuotasViolated and testResponseThrottleTimeWhenBothFetchAndRequestQuotasViolated.

The failure was due to throttle-time metric for produce/consume was not updated.

The root cause of the failure is that test's setUp() sets quota configs for various producers/consumers, which is done through admin client, but it waited for only default and unthrottled client quotas to be updated; it did not wait for quota of smallQuotaProducerClientId and smallQuotaConsumerClientId to be updated. The failed tests are those that verify throttle metrics of smallQuotaProducerClientId and smallQuotaConsumerClientId clients. One important details is that default request quota and request quota of smallQuotaConsumer/ProducerClientId are the same == 0.01. The test failure happens if the test runs before produce/consume quota gets updated (the default request quota is already small). In this case, the request gets throttled due to violating request quota, but not produce/consume quota, while the test expects that both types of quotas are violated. The fix is for the test to wait for all quotas to be updated in setUp before running tests.

I was not able to reproduce the test failure locally. However, I was able to "reproduce" this by adding a while loop in the beginning of ClientQuotaManager#updateQuota().

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@ijuma ijuma requested a review from rajinisivaram March 21, 2019 07:47
Copy link
Copy Markdown
Contributor

@rajinisivaram rajinisivaram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apovzner Thanks for the PR, LGTM. Will merge after builds complete.

@rajinisivaram
Copy link
Copy Markdown
Contributor

Merging to trunk and 2.2

@rajinisivaram rajinisivaram merged commit 58d0572 into apache:trunk Mar 21, 2019
rajinisivaram pushed a commit that referenced this pull request Mar 21, 2019
…re running tests (#6482)

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
jarekr pushed a commit to confluentinc/kafka that referenced this pull request Apr 18, 2019
* apache/trunk: (23 commits)
  KAFKA-7986: Distinguish logging from different ZooKeeperClient instances (apache#6493)
  KAFKA-8102: Add an interval-based Trogdor transaction generator (apache#6444)
  MINOR: Fix misspelling in protocol documentation
  KAFKA-8150: Fix bugs in handling null arrays in generated RPC code (apache#6489)
  KAFKA-8014: Extend Connect integration tests to add and remove workers dynamically (apache#6342)
  MINOR: Remove line for testing repartition topic name (apache#6488)
  MINOR: add MacOS requirement to Streams docs
  MINOR: fix message protocol help text for ElectPreferredLeadersResult (apache#6479)
  MINOR: list-topics should not require topic param
  MINOR: Clean up ThreadCacheTest (apache#6485)
  MINOR: Avoid unnecessary collection copy in MetadataCache (apache#6397)
  KAFKA-8142: Fix NPE for nulls in Headers (apache#6484)
  KAFKA-7243: Add unit integration tests to validate metrics in Kafka Streams (apache#6080)
  MINOR: Add verification step for Streams archetype to Jenkins build (apache#6431)
  KAFKA-7819: Improve RoundTripWorker (apache#6187)
  KAFKA-7989: RequestQuotaTest should wait for quota config change before running tests (apache#6482)
  KAFKA-8098: Fix Flaky Test testConsumerGroups
  KAFKA-6958: Add new NamedOperation interface to enforce consistency in naming operations (apache#6409)
  MINOR: capture result timestamps in Kafka Streams DSL tests (apache#6447)
  MINOR: updated names for deprecated streams constants (apache#6466)
  ...
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
…re running tests (apache#6482)

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants