tisonkun commented on code in PR #16993:
URL: https://github.com/apache/pulsar/pull/16993#discussion_r941305175
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java:
##########
@@ -496,7 +497,7 @@ public void testGlobalNamespaceReplicationConfiguration()
throws Exception {
Set<String> repCluster = (Set<String>) asyncRequests(rsp ->
namespaces.getNamespaceReplicationClusters(rsp,
this.testGlobalNamespaces.get(0).getTenant(),
this.testGlobalNamespaces.get(0).getCluster(),
this.testGlobalNamespaces.get(0).getLocalName()));
- assertEquals(repCluster, Sets.newHashSet());
+ assertEquals(repCluster, new HashSet());
Review Comment:
```suggestion
assertEquals(repCluster, new HashSet<>());
```
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/MaxUnackedMessagesTest.java:
##########
@@ -119,7 +119,7 @@ public void testMaxUnackedMessagesOnSubscription() throws
Exception {
// (2) try to consume messages: but will be able to consume number of
messages = unackMsgAllowed
Message<?> msg = null;
- Map<Message<?>, Consumer<?>> messages = Maps.newHashMap();
+ Map<Message<?>, Consumer<?>> messages = new HashMap();
Review Comment:
```suggestion
Map<Message<?>, Consumer<?>> messages = new HashMap<>();
```
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java:
##########
@@ -1230,7 +1231,7 @@ public void testSubscribeRate() throws Exception {
SubscribeRate subscribeRate = new SubscribeRate(1, 5);
String namespace = "my-tenants/my-namespace";
admin.tenants().createTenant("my-tenants",
- new TenantInfoImpl(Sets.newHashSet(),
Sets.newHashSet(testLocalCluster)));
+ new TenantInfoImpl(new HashSet(),
Sets.newHashSet(testLocalCluster)));
Review Comment:
```suggestion
new TenantInfoImpl(new HashSet<>(),
Set.of(testLocalCluster)));
```
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java:
##########
@@ -1230,7 +1231,7 @@ public void testSubscribeRate() throws Exception {
SubscribeRate subscribeRate = new SubscribeRate(1, 5);
String namespace = "my-tenants/my-namespace";
admin.tenants().createTenant("my-tenants",
- new TenantInfoImpl(Sets.newHashSet(),
Sets.newHashSet(testLocalCluster)));
+ new TenantInfoImpl(new HashSet(),
Sets.newHashSet(testLocalCluster)));
admin.namespaces().createNamespace(namespace,
Sets.newHashSet(testLocalCluster));
Review Comment:
```suggestion
admin.namespaces().createNamespace(namespace,
Set.of(testLocalCluster));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]