Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
4eb8bf23
Commit
4eb8bf23
authored
Jun 02, 2017
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1857: Fix for unit test failure in jenkins
parent
e19495ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
EntityDiscoveryService.java
...va/org/apache/atlas/discovery/EntityDiscoveryService.java
+0
-9
EntityDiscoveryServiceTest.java
...org/apache/atlas/services/EntityDiscoveryServiceTest.java
+5
-4
No files found.
repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
View file @
4eb8bf23
...
...
@@ -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
,
" "
));
}
...
...
repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java
View file @
4eb8bf23
...
...
@@ -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
(
")"
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment