KAFKA-13421; Reenable `testRollingBrokerRestartsWithSmallerMaxGroupSizeConfigDisruptsBigGroup` (#11485)

This test was disabled in af8100b94f. The reason the test was failing is that it assumes that the reference to `servers` can be mutated directly. The implementation in `IntegrationTestHarness` is intended to allow this by returning a mutable buffer, but the implementation actually returns a copy of the underlying collection. This caused the test case to create multiple `KafkaServer` instances instead of one as intended because it was modifying the copy. This led to the broker registration failure.

Reviewers: David Jacot <djacot@confluent.io>
This commit is contained in:
Jason Gustafson 2021-11-13 10:06:16 -08:00 committed by GitHub
parent 6f6248509c
commit e9db5a11e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -299,7 +299,6 @@ class ConsumerBounceTest extends AbstractConsumerTest with Logging {
* Then, 1 consumer should be left out of the group.
*/
@Test
@Disabled // To be re-enabled once we fix KAFKA-13421
def testRollingBrokerRestartsWithSmallerMaxGroupSizeConfigDisruptsBigGroup(): Unit = {
val group = "group-max-size-test"
val topic = "group-max-size-test"

View File

@ -55,7 +55,7 @@ abstract class KafkaServerTestHarness extends QuorumTestHarness {
*/
def servers: mutable.Buffer[KafkaServer] = {
checkIsZKTest()
_brokers.map(_.asInstanceOf[KafkaServer])
_brokers.asInstanceOf[mutable.Buffer[KafkaServer]]
}
var brokerList: String = null
@ -208,8 +208,9 @@ abstract class KafkaServerTestHarness extends QuorumTestHarness {
threadNamePrefix = None,
enableForwarding
)
} else {
brokers(i).startup()
}
_brokers(i).startup()
alive(i) = true
}
}