KAFKA-7980 - Fix timing issue in SocketServerTest.testConnectionRateLimit#6391
Merged
rajinisivaram merged 2 commits intoapache:trunkfrom Mar 8, 2019
Merged
Conversation
ijuma
reviewed
Mar 8, 2019
| // we can safely check that there were atleast 4 polls prior to the 5th connection. | ||
| val pollCount = testableSelector.operationCounts(SelectorOperation.Poll) | ||
| assertTrue(s"Connections created too quickly: $pollCount", pollCount >= numConnections) | ||
| assertTrue(s"Connections created too quickly: $pollCount", pollCount >= numConnections - 1) |
Contributor
Author
There was a problem hiding this comment.
@ijuma Thanks for the review. Did you mean pollCount > numConnections - 2? I was thinking -1 makes it more obvious that the last one was subtracted.
Member
There was a problem hiding this comment.
My bad, I misread. Your code looks good.
ijuma
reviewed
Mar 8, 2019
| assertEquals(Set.empty, errors) | ||
| testableSelector.waitForOperations(SelectorOperation.Register, numConnections) | ||
|
|
||
| // In each iteration, SocketServer processes atmost connectionQueueSize (1 in this test) |
Contributor
Author
|
@ijuma Thanks for the review, merging to trunk and 2.2. |
rajinisivaram
added a commit
to rajinisivaram/kafka
that referenced
this pull request
Mar 8, 2019
…imit (apache#6391) Test currently checks that there were at least 5 polls when 5 connections are established with connectionQueueSize=1. But we could be doing the check just after the 5th connection before the 5th poll, so updated the check to verify that there were at least 4 polls. Reviewers: Ismael Juma <ismael@juma.me.uk>
jarekr
pushed a commit
to confluentinc/kafka
that referenced
this pull request
Apr 18, 2019
* warn-apache-kafka/trunk: (41 commits) MINOR: Avoid double null check in KStream#transform() (apache#6429) KAFKA-7944: Improve Suppress test coverage (apache#6382) KAFKA-3522: add missing guards for TimestampedXxxStore (apache#6356) MINOR: Change Trogdor agent's cleanup executor to a cached thread pool (apache#6309) KAFKA-7976; Update config before notifying controller of unclean leader update (apache#6426) KAFKA-7801: TopicCommand should not be able to alter transaction topic partition count KAFKA-8091; Wait for processor shutdown before testing removed listeners (apache#6425) MINOR: Update delete topics zk path in assertion error messages KAFKA-7939: Fix timing issue in KafkaAdminClientTest.testCreateTopicsRetryBackoff KAFKA-7922: Return authorized operations in Metadata request response (KIP-430 Part-2) MINOR: Print usage when parse fails during console producer MINOR: fix Scala compiler warning (apache#6417) KAFKA-7288; Fix check in SelectorTest to wait for no buffered bytes (apache#6415) KAFKA-8065: restore original input record timestamp in forward() (apache#6393) MINOR: cleanup deprectaion annotations (apache#6290) KAFKA-3522: Add TimestampedWindowStore builder/runtime classes (apache#6173) KAFKA-8069; Fix early expiration of offsets due to invalid loading of expire timestamp (apache#6401) KAFKA-8070: Increase consumer startup timeout in system tests (apache#6405) KAFKA-8040: Streams handle initTransactions timeout (apache#6372) KAFKA-7980 - Fix timing issue in SocketServerTest.testConnectionRateLimit (apache#6391) ...
pengxiaolong
pushed a commit
to pengxiaolong/kafka
that referenced
this pull request
Jun 14, 2019
…imit (apache#6391) Test currently checks that there were at least 5 polls when 5 connections are established with connectionQueueSize=1. But we could be doing the check just after the 5th connection before the 5th poll, so updated the check to verify that there were at least 4 polls. Reviewers: Ismael Juma <ismael@juma.me.uk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test currently checks that there were at least 5 polls when 5 connections are established with connectionQueueSize=1. But we could be doing the check just after the 5th connection before the 5th poll, so updated the check to verify that there were at least 4 polls.
I could not recreate the failure with or without the fix.
Committer Checklist (excluded from commit message)