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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9198f12cc [GOBBLIN-1899] More unit tests for ClustersNames (#3763)
9198f12cc is described below

commit 9198f12cc5fd440acbc64fb9c2bfe7770097547d
Author: Matthew Ho <[email protected]>
AuthorDate: Wed Sep 6 17:44:25 2023 -0700

    [GOBBLIN-1899] More unit tests for ClustersNames (#3763)
---
 .../src/test/java/org/apache/gobblin/util/ClustersNamesTest.java    | 6 ++++++
 gobblin-utility/src/test/resources/GobblinClustersNames.properties  | 1 +
 2 files changed, 7 insertions(+)

diff --git 
a/gobblin-utility/src/test/java/org/apache/gobblin/util/ClustersNamesTest.java 
b/gobblin-utility/src/test/java/org/apache/gobblin/util/ClustersNamesTest.java
index cffb79216..c86bf3ee9 100644
--- 
a/gobblin-utility/src/test/java/org/apache/gobblin/util/ClustersNamesTest.java
+++ 
b/gobblin-utility/src/test/java/org/apache/gobblin/util/ClustersNamesTest.java
@@ -33,6 +33,10 @@ public class ClustersNamesTest {
                 "cluster1");
         
Assert.assertEquals(clustersNames.getClusterName("http://cluster2-rm.some.company.com:12345";),
                 "cluster2");
+        
Assert.assertEquals(clustersNames.getClusterName("http://coloc1-some-identifier.some.company.com:8032";),
+            "cluster-no-scheme-with-port");
+        
Assert.assertEquals(clustersNames.getClusterName("https://coloc1-some-identifier.some.company.com:8032";),
+            "cluster-no-scheme-with-port");
     }
 
     @Test
@@ -41,6 +45,8 @@ public class ClustersNamesTest {
                 "cluster1-rm.some.company.com");
         
Assert.assertEquals(clustersNames.getClusterName("cluster-host-name-4.some.company.com"),
                 "cluster4");
+        
Assert.assertEquals(clustersNames.getClusterName("coloc1-some-identifier.some.company.com:8032"),
+            "cluster-no-scheme-with-port");
     }
 
     @Test
diff --git a/gobblin-utility/src/test/resources/GobblinClustersNames.properties 
b/gobblin-utility/src/test/resources/GobblinClustersNames.properties
index dc756c3d2..dea452678 100644
--- a/gobblin-utility/src/test/resources/GobblinClustersNames.properties
+++ b/gobblin-utility/src/test/resources/GobblinClustersNames.properties
@@ -20,4 +20,5 @@
 http\://cluster1-rm.some.company.com=cluster1
 http\://cluster2-rm.some.company.com\:12345=cluster2
 cluster-host-name-4.some.company.com=cluster4
+coloc1-some-identifier.some.company.com\:8032=cluster-no-scheme-with-port
 http\://cluster-host-name-4.some.company.com\:789=cluster4-custom-port

Reply via email to