-
Notifications
You must be signed in to change notification settings - Fork 14.4k
MINOR: Cleanup Core Module- Scala Modules (3/n) #19804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
Thanks @sjhajharia for this patch, please check the fail tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sjhajharia: Thanks for the clean up.
I have a few comments.
core/src/test/scala/unit/kafka/cluster/AssignmentStateTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/coordinator/group/CoordinatorPartitionWriterTest.scala
Outdated
Show resolved
Hide resolved
...rc/test/scala/unit/kafka/coordinator/transaction/TransactionCoordinatorConcurrencyTest.scala
Outdated
Show resolved
Hide resolved
@@ -364,7 +364,7 @@ abstract class KafkaServerTestHarness extends QuorumTestHarness { | |||
def changeClientIdConfig(sanitizedClientId: String, configs: Properties): Unit = { | |||
Using.resource(createAdminClient(brokers, listenerName)) { | |||
admin => { | |||
admin.alterClientQuotas(Collections.singleton( | |||
admin.alterClientQuotas(util.Set.of( | |||
new ClientQuotaAlteration( | |||
new ClientQuotaEntity(Map(ClientQuotaEntity.CLIENT_ID -> (if (sanitizedClientId == "<default>") null else sanitizedClientId)).asJava), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be java.util.Map.of
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. We can't use that here because of the if block. In case of "' it ends up with null with Map.of wouldn't allow.
core/src/test/scala/unit/kafka/integration/UncleanLeaderElectionTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/integration/UncleanLeaderElectionTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/integration/UncleanLeaderElectionTest.scala
Outdated
Show resolved
Hide resolved
Thanks @frankvicky for the review. I have addressed all the comments. |
Now that Kafka Brokers support Java 17, this PR makes some changes in
core module. The changes in this PR are limited to only some Scala files
in the Core module's tests. The changes mostly include:
To be clear, the directories being targeted in this PR from unit.kafka module: