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 76d171e2c5 verify ServerRoutingInstance equals (#12614)
76d171e2c5 is described below

commit 76d171e2c5bdb8f43b0ff6f1dea20f115f2e58ff
Author: sullis <[email protected]>
AuthorDate: Mon Mar 11 17:07:04 2024 -0700

    verify ServerRoutingInstance equals (#12614)
---
 .../core/transport/ServerRoutingInstance.java      |  2 +-
 .../core/transport/ServerRoutingInstanceTest.java  | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git 
a/pinot-core/src/main/java/org/apache/pinot/core/transport/ServerRoutingInstance.java
 
b/pinot-core/src/main/java/org/apache/pinot/core/transport/ServerRoutingInstance.java
index 9b4f9926fb..faa2cd91a3 100644
--- 
a/pinot-core/src/main/java/org/apache/pinot/core/transport/ServerRoutingInstance.java
+++ 
b/pinot-core/src/main/java/org/apache/pinot/core/transport/ServerRoutingInstance.java
@@ -34,7 +34,7 @@ import org.apache.pinot.spi.utils.CommonConstants.Helix;
  * might be treated as two different routing target instances based on the 
types of table it serves.
  */
 @ThreadSafe
-public class ServerRoutingInstance {
+public final class ServerRoutingInstance {
   private static final String SHORT_OFFLINE_SUFFIX = "_O";
   private static final String SHORT_REALTIME_SUFFIX = "_R";
   private static final Map<String, String> SHORT_HOSTNAME_MAP = new 
ConcurrentHashMap<>();
diff --git 
a/pinot-core/src/test/java/org/apache/pinot/core/transport/ServerRoutingInstanceTest.java
 
b/pinot-core/src/test/java/org/apache/pinot/core/transport/ServerRoutingInstanceTest.java
new file mode 100644
index 0000000000..991cd19181
--- /dev/null
+++ 
b/pinot-core/src/test/java/org/apache/pinot/core/transport/ServerRoutingInstanceTest.java
@@ -0,0 +1,32 @@
+/**
+ * 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 nl.jqno.equalsverifier.Warning;
+import org.testng.annotations.Test;
+
+
+public class ServerRoutingInstanceTest {
+  @Test
+  public void equalsVerifier() {
+    EqualsVerifier.configure().forClass(ServerRoutingInstance.class)
+        .withOnlyTheseFields("_hostname", "_port", 
"_tableType").suppress(Warning.NULL_FIELDS).verify();
+  }
+}


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

Reply via email to