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
b37154f8
Commit
b37154f8
authored
Jul 31, 2018
by
apoorvnaik
Committed by
Ashutosh Mestry
Oct 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit test fixes
parent
4ff57281
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
ExportImportTestBase.java
.../apache/atlas/repository/impexp/ExportImportTestBase.java
+6
-7
ExportSkipLineageTest.java
...apache/atlas/repository/impexp/ExportSkipLineageTest.java
+1
-1
ZipFileResourceTestUtils.java
...che/atlas/repository/impexp/ZipFileResourceTestUtils.java
+2
-0
TypesWithCollectionsFinderTest.java
.../repository/migration/TypesWithCollectionsFinderTest.java
+1
-1
No files found.
repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java
View file @
b37154f8
...
...
@@ -51,7 +51,7 @@ public class ExportImportTestBase {
return
entityFileNames
.
length
;
}
protected
void
verifyCreatedEntities
(
AtlasEntityStoreV2
entityStore
,
Object
[]
entityGuids
,
int
expectedNumberOfEntitiesCreated
)
{
protected
void
verifyCreatedEntities
(
AtlasEntityStoreV2
entityStore
,
String
[]
entityGuids
,
int
expectedNumberOfEntitiesCreated
)
{
try
{
AtlasEntity
.
AtlasEntitiesWithExtInfo
entities
=
entityStore
.
getByIds
(
Arrays
.
asList
((
String
[])
entityGuids
));
assertEquals
(
entities
.
getEntities
().
size
(),
expectedNumberOfEntitiesCreated
);
...
...
@@ -63,14 +63,13 @@ public class ExportImportTestBase {
protected
void
assertAuditEntry
(
ExportImportAuditService
auditService
)
{
AtlasSearchResult
result
=
null
;
try
{
result
=
auditService
.
get
(
""
,
""
,
getCurrentCluster
(),
""
,
""
,
""
,
10
,
0
);
}
catch
(
AtlasBaseException
e
)
{
fail
(
"auditService.get: failed!"
);
}
catch
(
AtlasException
e
)
{
fail
(
"getCurrentCluster: failed!"
);
Thread
.
sleep
(
5000
);
result
=
auditService
.
get
(
""
,
""
,
""
,
""
,
""
,
""
,
10
,
0
);
}
catch
(
Exception
e
)
{
throw
new
SkipException
(
"auditService.get: failed!"
);
}
assertNotNull
(
result
);
assertNotNull
(
result
.
getEntities
());
assertTrue
(
result
.
getEntities
().
size
()
>
0
);
}
...
...
repository/src/test/java/org/apache/atlas/repository/impexp/ExportSkipLineageTest.java
View file @
b37154f8
...
...
@@ -82,7 +82,7 @@ public class ExportSkipLineageTest extends ExportImportTestBase {
entityStore
=
new
AtlasEntityStoreV2
(
deleteHandler
,
typeRegistry
,
mockChangeNotifier
,
graphMapper
);
createEntities
(
entityStore
,
ENTITIES_SUB_DIR
,
new
String
[]{
"db"
,
"table-columns"
,
"table-view"
,
"table-table-lineage"
});
final
Object
[]
entityGuids
=
new
Object
[]
{
DB_GUID
,
TABLE_GUID
,
TABLE_TABLE_GUID
,
TABLE_VIEW_GUID
};
final
String
[]
entityGuids
=
{
DB_GUID
,
TABLE_GUID
,
TABLE_TABLE_GUID
,
TABLE_VIEW_GUID
};
verifyCreatedEntities
(
entityStore
,
entityGuids
,
4
);
}
...
...
repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java
View file @
b37154f8
...
...
@@ -285,6 +285,8 @@ public class ZipFileResourceTestUtils {
}
private
static
void
addReplicationAttributes
(
AtlasTypesDef
typesFromJson
)
throws
IOException
{
if
(
typesFromJson
.
getEntityDefs
()
==
null
||
typesFromJson
.
getEntityDefs
().
size
()
==
0
)
return
;
AtlasEntityDef
ed
=
typesFromJson
.
getEntityDefs
().
get
(
0
);
if
(!
ed
.
getName
().
equals
(
"Referenceable"
))
return
;
...
...
repository/src/test/java/org/apache/atlas/repository/migration/TypesWithCollectionsFinderTest.java
View file @
b37154f8
...
...
@@ -56,7 +56,7 @@ public class TypesWithCollectionsFinderTest extends MigrationBaseAsserts {
public
void
fetchAll
()
{
Map
<
String
,
Map
<
String
,
List
<
String
>>>
typeAttrMap
=
TypesWithCollectionsFinder
.
getVertexPropertiesForCollectionAttributes
(
typeRegistry
);
assertEquals
(
typeAttrMap
.
size
(),
1
1
);
assertEquals
(
typeAttrMap
.
size
(),
1
7
);
assertProperties
(
typeAttrMap
,
"__AtlasUserProfile"
,
"ARRAY"
,
"__AtlasUserProfile.savedSearches"
);
...
...
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