File tree 1 file changed +4
-7
lines changed
core/src/test/scala/unit/kafka/server
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -5507,14 +5507,11 @@ class KafkaApisTest extends Logging {
5507
5507
))
5508
5508
)
5509
5509
5510
- val erroneousPartitions: util.Map[TopicIdPartition, ShareFetchResponseData.PartitionData] = new util.HashMap()
5511
- erroneousPartitions.put(
5510
+ val erroneousPartitions = util.Map.of[TopicIdPartition, ShareFetchResponseData.PartitionData](
5512
5511
tp2,
5513
5512
new ShareFetchResponseData.PartitionData()
5514
5513
.setPartitionIndex(1)
5515
- .setErrorCode(Errors.UNKNOWN_TOPIC_OR_PARTITION.code)
5516
- )
5517
- erroneousPartitions.put(
5514
+ .setErrorCode(Errors.UNKNOWN_TOPIC_OR_PARTITION.code),
5518
5515
tp3,
5519
5516
new ShareFetchResponseData.PartitionData()
5520
5517
.setPartitionIndex(0)
@@ -10733,8 +10730,8 @@ class KafkaApisTest extends Logging {
10733
10730
val request = buildRequest(new ListClientMetricsResourcesRequest.Builder(new ListClientMetricsResourcesRequestData()).build())
10734
10731
metadataCache = new KRaftMetadataCache(brokerId, () => KRaftVersion.KRAFT_VERSION_0)
10735
10732
10736
- val resources = new mutable .HashSet[String]
10737
- when(clientMetricsManager.listClientMetricsResources).thenReturn(resources.asJava )
10733
+ val resources = new util .HashSet[String]
10734
+ when(clientMetricsManager.listClientMetricsResources).thenReturn(resources)
10738
10735
kafkaApis = createKafkaApis()
10739
10736
kafkaApis.handle(request, RequestLocal.noCaching)
10740
10737
val response = verifyNoThrottling[ListClientMetricsResourcesResponse](request)
You can’t perform that action at this time.
0 commit comments