atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject incubator-atlas git commit: ATLAS-1857: Fix for unit test failure in jenkins
Date Fri, 02 Jun 2017 20:51:53 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master e19495ad2 -> 4eb8bf23b


ATLAS-1857: Fix for unit test failure in jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/4eb8bf23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/4eb8bf23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/4eb8bf23

Branch: refs/heads/master
Commit: 4eb8bf23be13d44b6d0d2441d6fef19b5f8f3b88
Parents: e19495a
Author: Sarath Subramanian <ssubramanian@hortonworks.com>
Authored: Fri Jun 2 13:51:40 2017 -0700
Committer: Sarath Subramanian <ssubramanian@hortonworks.com>
Committed: Fri Jun 2 13:51:40 2017 -0700

----------------------------------------------------------------------
 .../org/apache/atlas/discovery/EntityDiscoveryService.java  | 9 ---------
 .../apache/atlas/services/EntityDiscoveryServiceTest.java   | 9 +++++----
 2 files changed, 5 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/4eb8bf23/repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
b/repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
index 36b7f8c..128cdbf 100644
--- a/repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
+++ b/repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
@@ -437,15 +437,6 @@ public class EntityDiscoveryService implements AtlasDiscoveryService
{
         AtlasEntityType type            = typeRegistry.getEntityTypeByName(typeName);
         Set<String>     typeAndSubTypes = type != null ? type.getTypeAndAllSubTypes()
: null;
 
-        // adding debug info to investigate unit test failure in jenkins
-        // EntityDiscoveryServiceTest.getSubTypeForTypeWithSubTypes_ReturnsOrClause
-        if (StringUtils.isNotEmpty(typeName) && type != null) {
-            LOG.info("Getting type and subTypes for type name: {}, AtlasType: {}", typeName,
type.getEntityDef().toString());
-            LOG.info("Type and subTypes list: {}", StringUtils.join(typeAndSubTypes, " "));
-            LOG.info("Maximum Types Count: {}", maxTypesCountInIdxQuery);
-        }
-
-
         if(CollectionUtils.isNotEmpty(typeAndSubTypes) && typeAndSubTypes.size()
<= maxTypesCountInIdxQuery) {
             return String.format("(%s)", StringUtils.join(typeAndSubTypes, " "));
         }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/4eb8bf23/repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java
----------------------------------------------------------------------
diff --git a/repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java
b/repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java
index f8fb731..5d5b043 100644
--- a/repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java
+++ b/repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java
@@ -97,10 +97,11 @@ public class EntityDiscoveryServiceTest {
     public void getSubTypeForTypeWithSubTypes_ReturnsOrClause() throws Exception {
         String s = invokeGetSubTypesForType(TEST_TYPE_WITH_SUB_TYPES, maxTypesCountInIdxQuery);
 
-        assertTrue(s.startsWith("(" + TEST_TYPE_WITH_SUB_TYPES));
-        assertTrue(s.contains(" " + TEST_TYPE1));
-        assertTrue(s.contains(" " + TEST_TYPE2));
-        assertTrue(s.contains(" " + TEST_TYPE3));
+        assertTrue(s.startsWith("("));
+        assertTrue(s.contains(TEST_TYPE_WITH_SUB_TYPES));
+        assertTrue(s.contains(TEST_TYPE1));
+        assertTrue(s.contains(TEST_TYPE2));
+        assertTrue(s.contains(TEST_TYPE3));
         assertTrue(s.endsWith(")"));
     }
 


Mime
View raw message