{"action":"created","issue":{"url":"https://api.github.com/repos/apache/kafka/issues/4918","repository_url":"https://api.github.com/repos/apache/kafka","labels_url":"https://api.github.com/repos/apache/kafka/issues/4918/labels{/name}","comments_url":"https://api.github.com/repos/apache/kafka/issues/4918/comments","events_url":"https://api.github.com/repos/apache/kafka/issues/4918/events","html_url":"https://github.com/apache/kafka/pull/4918","id":317060506,"number":4918,"title":"KAFKA-6795: Added unit tests for ReplicaAlterLogDirsThread","user":{"login":"apovzner","id":5383840,"avatar_url":"https://avatars0.githubusercontent.com/u/5383840?v=4","gravatar_id":"","url":"https://api.github.com/users/apovzner","html_url":"https://github.com/apovzner","followers_url":"https://api.github.com/users/apovzner/followers","following_url":"https://api.github.com/users/apovzner/following{/other_user}","gists_url":"https://api.github.com/users/apovzner/gists{/gist_id}","starred_url":"https://api.github.com/users/apovzner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apovzner/subscriptions","organizations_url":"https://api.github.com/users/apovzner/orgs","repos_url":"https://api.github.com/users/apovzner/repos","events_url":"https://api.github.com/users/apovzner/events{/privacy}","received_events_url":"https://api.github.com/users/apovzner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-24T03:48:54Z","updated_at":"2018-04-24T17:54:58Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/4918","html_url":"https://github.com/apache/kafka/pull/4918","diff_url":"https://github.com/apache/kafka/pull/4918.diff","patch_url":"https://github.com/apache/kafka/pull/4918.patch"},"body":"Added unit tests for ReplicaAlterLogDirsThread. Mostly focused on unit tests for truncating logic.\r\n\r\nFixed  ReplicaAlterLogDirsThread.buildLeaderEpochRequest() to use future replica's latest epoch (not the latest epoch of replica it is fetching from). This follows the logic that offset for leader epoch request should be based on leader epoch of the follower (in this case it's the future local replica). \r\n\r\nAlso fixed PartitionFetchState constructor that takes offset and delay. The code ignored the delay parameter and used 0 for the delay. This constructor is used only by another constructor which passes delay = 0, which luckily works. \r\n\r\n### Committer Checklist (excluded from commit message)\r\n- [ ] Verify design and implementation \r\n- [ ] Verify test coverage and CI build status\r\n- [ ] Verify documentation (including upgrade notes)\r\n"},"comment":{"url":"https://api.github.com/repos/apache/kafka/issues/comments/384023366","html_url":"https://github.com/apache/kafka/pull/4918#issuecomment-384023366","issue_url":"https://api.github.com/repos/apache/kafka/issues/4918","id":384023366,"user":{"login":"apovzner","id":5383840,"avatar_url":"https://avatars0.githubusercontent.com/u/5383840?v=4","gravatar_id":"","url":"https://api.github.com/users/apovzner","html_url":"https://github.com/apovzner","followers_url":"https://api.github.com/users/apovzner/followers","following_url":"https://api.github.com/users/apovzner/following{/other_user}","gists_url":"https://api.github.com/users/apovzner/gists{/gist_id}","starred_url":"https://api.github.com/users/apovzner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apovzner/subscriptions","organizations_url":"https://api.github.com/users/apovzner/orgs","repos_url":"https://api.github.com/users/apovzner/repos","events_url":"https://api.github.com/users/apovzner/events{/privacy}","received_events_url":"https://api.github.com/users/apovzner/received_events","type":"User","site_admin":false},"created_at":"2018-04-24T17:54:58Z","updated_at":"2018-04-24T17:54:58Z","author_association":"CONTRIBUTOR","body":"Two unrelated test failures:\r\n15:58:46 kafka.server.DynamicBrokerReconfigurationTest > testThreadPoolResize FAILED\r\n15:58:46     java.lang.AssertionError: Invalid threads: expected 6, got 7: List(ReplicaFetcherThread-0-0, ReplicaFetcherThread-0-1, ReplicaFetcherThread-0-2, ReplicaFetcherThread-0-0, ReplicaFetcherThread-0-2, ReplicaFetcherThread-1-0, ReplicaFetcherThread-0-1)\r\n15:58:46         at org.junit.Assert.fail(Assert.java:88)\r\n15:58:46         at org.junit.Assert.assertTrue(Assert.java:41)\r\n15:58:46         at kafka.server.DynamicBrokerReconfigurationTest.verifyThreads(DynamicBrokerReconfigurationTest.scala:1147)\r\n15:58:46         at kafka.server.DynamicBrokerReconfigurationTest.maybeVerifyThreadPoolSize$1(DynamicBrokerReconfigurationTest.scala:412)\r\n15:58:46         at kafka.server.DynamicBrokerReconfigurationTest.resizeThreadPool$1(DynamicBrokerReconfigurationTest.scala:431)\r\n15:58:46         at kafka.server.DynamicBrokerReconfigurationTest.reducePoolSize$1(DynamicBrokerReconfigurationTest.scala:417)\r\n15:58:46         at kafka.server.DynamicBrokerReconfigurationTest.$anonfun$testThreadPoolResize$3(DynamicBrokerReconfigurationTest.scala:440)\r\n15:58:46         at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:156)\r\n15:58:46         at kafka.server.DynamicBrokerReconfigurationTest.verifyThreadPoolResize$1(DynamicBrokerReconfigurationTest.scala:439)\r\n15:58:46         at kafka.server.DynamicBrokerReconfigurationTest.testThreadPoolResize(DynamicBrokerReconfigurationTest.scala:453)\r\n\r\n17:20:49 kafka.server.DynamicBrokerReconfigurationTest > testAddRemoveSslListener FAILED\r\n17:20:49     java.lang.AssertionError: expected:<10> but was:<12>\r\n17:20:49         at org.junit.Assert.fail(Assert.java:88)\r\n17:20:49         at org.junit.Assert.failNotEquals(Assert.java:834)\r\n17:20:49         at org.junit.Assert.assertEquals(Assert.java:645)\r\n17:20:49         at org.junit.Assert.assertEquals(Assert.java:631)\r\n17:20:49         at kafka.server.DynamicBrokerReconfigurationTest.verifyProduceConsume(DynamicBrokerReconfigurationTest.scala:959)\r\n17:20:49         at kafka.server.DynamicBrokerReconfigurationTest.verifyRemoveListener(DynamicBrokerReconfigurationTest.scala:784)\r\n17:20:49         at kafka.server.DynamicBrokerReconfigurationTest.testAddRemoveSslListener(DynamicBrokerReconfigurationTest.scala:705)\r\n17:20:50 "}}
{"actor":{"display_login":"apovzner"}}