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
6 years ago
by
apoorvnaik
Committed by
Ashutosh Mestry
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit test fixes
parent
4ff57281
master
No related merge requests found
Show 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 {
...
@@ -51,7 +51,7 @@ public class ExportImportTestBase {
return
entityFileNames
.
length
;
return
entityFileNames
.
length
;
}
}
protected
void
verifyCreatedEntities
(
AtlasEntityStoreV2
entityStore
,
Object
[]
entityGuids
,
int
expectedNumberOfEntitiesCreated
)
{
protected
void
verifyCreatedEntities
(
AtlasEntityStoreV2
entityStore
,
String
[]
entityGuids
,
int
expectedNumberOfEntitiesCreated
)
{
try
{
try
{
AtlasEntity
.
AtlasEntitiesWithExtInfo
entities
=
entityStore
.
getByIds
(
Arrays
.
asList
((
String
[])
entityGuids
));
AtlasEntity
.
AtlasEntitiesWithExtInfo
entities
=
entityStore
.
getByIds
(
Arrays
.
asList
((
String
[])
entityGuids
));
assertEquals
(
entities
.
getEntities
().
size
(),
expectedNumberOfEntitiesCreated
);
assertEquals
(
entities
.
getEntities
().
size
(),
expectedNumberOfEntitiesCreated
);
...
@@ -63,14 +63,13 @@ public class ExportImportTestBase {
...
@@ -63,14 +63,13 @@ public class ExportImportTestBase {
protected
void
assertAuditEntry
(
ExportImportAuditService
auditService
)
{
protected
void
assertAuditEntry
(
ExportImportAuditService
auditService
)
{
AtlasSearchResult
result
=
null
;
AtlasSearchResult
result
=
null
;
try
{
try
{
result
=
auditService
.
get
(
""
,
""
,
getCurrentCluster
(),
""
,
""
,
""
,
10
,
0
);
Thread
.
sleep
(
5000
);
}
catch
(
AtlasBaseException
e
)
{
result
=
auditService
.
get
(
""
,
""
,
""
,
""
,
""
,
""
,
10
,
0
);
fail
(
"auditService.get: failed!"
);
}
catch
(
Exception
e
)
{
}
catch
(
AtlasException
e
)
{
throw
new
SkipException
(
"auditService.get: failed!"
);
fail
(
"getCurrentCluster: failed!"
);
}
}
assertNotNull
(
result
);
assertNotNull
(
result
);
assertNotNull
(
result
.
getEntities
());
assertTrue
(
result
.
getEntities
().
size
()
>
0
);
assertTrue
(
result
.
getEntities
().
size
()
>
0
);
}
}
...
...
This diff is collapsed.
Click to expand it.
repository/src/test/java/org/apache/atlas/repository/impexp/ExportSkipLineageTest.java
View file @
b37154f8
...
@@ -82,7 +82,7 @@ public class ExportSkipLineageTest extends ExportImportTestBase {
...
@@ -82,7 +82,7 @@ public class ExportSkipLineageTest extends ExportImportTestBase {
entityStore
=
new
AtlasEntityStoreV2
(
deleteHandler
,
typeRegistry
,
mockChangeNotifier
,
graphMapper
);
entityStore
=
new
AtlasEntityStoreV2
(
deleteHandler
,
typeRegistry
,
mockChangeNotifier
,
graphMapper
);
createEntities
(
entityStore
,
ENTITIES_SUB_DIR
,
new
String
[]{
"db"
,
"table-columns"
,
"table-view"
,
"table-table-lineage"
});
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
);
verifyCreatedEntities
(
entityStore
,
entityGuids
,
4
);
}
}
...
...
This diff is collapsed.
Click to expand it.
repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java
View file @
b37154f8
...
@@ -285,6 +285,8 @@ public class ZipFileResourceTestUtils {
...
@@ -285,6 +285,8 @@ public class ZipFileResourceTestUtils {
}
}
private
static
void
addReplicationAttributes
(
AtlasTypesDef
typesFromJson
)
throws
IOException
{
private
static
void
addReplicationAttributes
(
AtlasTypesDef
typesFromJson
)
throws
IOException
{
if
(
typesFromJson
.
getEntityDefs
()
==
null
||
typesFromJson
.
getEntityDefs
().
size
()
==
0
)
return
;
AtlasEntityDef
ed
=
typesFromJson
.
getEntityDefs
().
get
(
0
);
AtlasEntityDef
ed
=
typesFromJson
.
getEntityDefs
().
get
(
0
);
if
(!
ed
.
getName
().
equals
(
"Referenceable"
))
return
;
if
(!
ed
.
getName
().
equals
(
"Referenceable"
))
return
;
...
...
This diff is collapsed.
Click to expand it.
repository/src/test/java/org/apache/atlas/repository/migration/TypesWithCollectionsFinderTest.java
View file @
b37154f8
...
@@ -56,7 +56,7 @@ public class TypesWithCollectionsFinderTest extends MigrationBaseAsserts {
...
@@ -56,7 +56,7 @@ public class TypesWithCollectionsFinderTest extends MigrationBaseAsserts {
public
void
fetchAll
()
{
public
void
fetchAll
()
{
Map
<
String
,
Map
<
String
,
List
<
String
>>>
typeAttrMap
=
TypesWithCollectionsFinder
.
getVertexPropertiesForCollectionAttributes
(
typeRegistry
);
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"
);
assertProperties
(
typeAttrMap
,
"__AtlasUserProfile"
,
"ARRAY"
,
"__AtlasUserProfile.savedSearches"
);
...
...
This diff is collapsed.
Click to expand it.
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