This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 8737a1787e verify ServerInstance equals (#12592)
8737a1787e is described below

commit 8737a1787e144df810fef44d9290398d6c787446
Author: sullis <[email protected]>
AuthorDate: Thu Mar 7 14:12:50 2024 -0800

    verify ServerInstance equals (#12592)
---
 .../pinot/core/transport/ServerInstance.java       |  2 +-
 .../pinot/core/transport/ServerInstanceTest.java   | 31 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git 
a/pinot-core/src/main/java/org/apache/pinot/core/transport/ServerInstance.java 
b/pinot-core/src/main/java/org/apache/pinot/core/transport/ServerInstance.java
index 8809e4a015..90da9ffc11 100644
--- 
a/pinot-core/src/main/java/org/apache/pinot/core/transport/ServerInstance.java
+++ 
b/pinot-core/src/main/java/org/apache/pinot/core/transport/ServerInstance.java
@@ -28,7 +28,7 @@ import org.apache.pinot.spi.utils.CommonConstants;
 import org.apache.pinot.spi.utils.CommonConstants.Helix;
 
 
-public class ServerInstance {
+public final class ServerInstance {
 
   public enum RoutingType {
     NETTY, GRPC, NETTY_TLS
diff --git 
a/pinot-core/src/test/java/org/apache/pinot/core/transport/ServerInstanceTest.java
 
b/pinot-core/src/test/java/org/apache/pinot/core/transport/ServerInstanceTest.java
new file mode 100644
index 0000000000..f529c32942
--- /dev/null
+++ 
b/pinot-core/src/test/java/org/apache/pinot/core/transport/ServerInstanceTest.java
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.core.transport;
+
+import nl.jqno.equalsverifier.EqualsVerifier;
+import org.testng.annotations.Test;
+
+
+public class ServerInstanceTest {
+  @Test
+  public void equalsVerifier() {
+    
EqualsVerifier.configure().forClass(ServerInstance.class).withOnlyTheseFields("_instanceId")
+        .withNonnullFields("_instanceId").verify();
+  }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to