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
f6acb086
Commit
f6acb086
authored
Oct 01, 2018
by
Ashutosh Mestry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2888: Change marker fix for server name. Unit test fix.
parent
6f747203
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
14 deletions
+18
-14
ExportServiceTest.java
...org/apache/atlas/repository/impexp/ExportServiceTest.java
+10
-6
ImportServiceTest.java
...org/apache/atlas/repository/impexp/ImportServiceTest.java
+5
-5
ReplicationEntityAttributeTest.java
...las/repository/impexp/ReplicationEntityAttributeTest.java
+2
-2
ClassificationPropagationTest.java
...ository/tagpropagation/ClassificationPropagationTest.java
+1
-1
No files found.
repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
View file @
f6acb086
...
...
@@ -26,6 +26,7 @@ import org.apache.atlas.model.impexp.AtlasExportRequest;
import
org.apache.atlas.model.impexp.AtlasExportResult
;
import
org.apache.atlas.model.instance.AtlasEntity
;
import
org.apache.atlas.model.instance.AtlasObjectId
;
import
org.apache.atlas.model.instance.EntityMutationResponse
;
import
org.apache.atlas.model.typedef.AtlasTypesDef
;
import
org.apache.atlas.repository.graph.AtlasGraphProvider
;
import
org.apache.atlas.repository.store.bootstrap.AtlasTypeDefStoreInitializer
;
...
...
@@ -84,9 +85,11 @@ public class ExportServiceTest extends ExportImportTestBase {
@Inject
private
ExportImportAuditService
auditService
;
@Inject
private
AtlasEntityStoreV2
entityStore
;
private
DeleteHandlerV1
deleteHandler
=
mock
(
SoftDeleteHandlerV1
.
class
);;
private
AtlasEntityChangeNotifier
mockChangeNotifier
=
mock
(
AtlasEntityChangeNotifier
.
class
);
private
AtlasEntityStoreV2
entityStore
;
@BeforeTest
public
void
setupTest
()
throws
IOException
,
AtlasBaseException
{
...
...
@@ -106,11 +109,12 @@ public class ExportServiceTest extends ExportImportTestBase {
typeDefStore
.
createTypesDef
(
typesToCreate
);
}
AtlasEntity
.
AtlasEntitiesWithExtInfo
hrDept
=
TestUtilsV2
.
createDeptEg2
();
AtlasEntityStream
entityStream
=
new
AtlasEntityStream
(
hrDept
);
entityStore
.
createOrUpdate
(
entityStream
,
false
);
LOG
.
debug
(
"==> setupSampleData: "
,
AtlasEntity
.
dumpObjects
(
hrDept
.
getEntities
(),
null
).
toString
());
AtlasEntity
.
AtlasEntitiesWithExtInfo
deptEg2
=
TestUtilsV2
.
createDeptEg2
();
AtlasEntityStream
entityStream
=
new
AtlasEntityStream
(
deptEg2
);
EntityMutationResponse
emr
=
entityStore
.
createOrUpdate
(
entityStream
,
false
);
assertNotNull
(
emr
);
assertNotNull
(
emr
.
getCreatedEntities
());
assertTrue
(
emr
.
getCreatedEntities
().
size
()
>
0
);
}
@AfterClass
...
...
repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java
View file @
f6acb086
...
...
@@ -213,7 +213,7 @@ public class ImportServiceTest extends ExportImportTestBase {
}
@DataProvider
(
name
=
"stocks-legacy"
)
public
static
Object
[][]
getDataFromLegacyStocks
(
ITestContext
context
)
throws
IOException
{
public
static
Object
[][]
getDataFromLegacyStocks
(
ITestContext
context
)
throws
IOException
,
AtlasBaseException
{
return
getZipSource
(
"stocks.zip"
);
}
...
...
@@ -254,7 +254,7 @@ public class ImportServiceTest extends ExportImportTestBase {
}
@DataProvider
(
name
=
"stocks-glossary"
)
public
static
Object
[][]
getDataFromGlossary
(
ITestContext
context
)
throws
IOException
{
public
static
Object
[][]
getDataFromGlossary
(
ITestContext
context
)
throws
IOException
,
AtlasBaseException
{
return
getZipSource
(
"stocks-glossary.zip"
);
}
...
...
@@ -298,12 +298,12 @@ public class ImportServiceTest extends ExportImportTestBase {
}
@DataProvider
(
name
=
"relationshipLineage"
)
public
static
Object
[][]
getImportWithRelationships
(
ITestContext
context
)
throws
IOException
{
public
static
Object
[][]
getImportWithRelationships
(
ITestContext
context
)
throws
IOException
,
AtlasBaseException
{
return
getZipSource
(
"rel-lineage.zip"
);
}
@DataProvider
(
name
=
"tag-prop-2"
)
public
static
Object
[][]
getImportWithTagProp2
(
ITestContext
context
)
throws
IOException
{
public
static
Object
[][]
getImportWithTagProp2
(
ITestContext
context
)
throws
IOException
,
AtlasBaseException
{
return
getZipSource
(
"tag-prop-2.zip"
);
}
...
...
@@ -316,7 +316,7 @@ public class ImportServiceTest extends ExportImportTestBase {
}
@DataProvider
(
name
=
"relationship"
)
public
static
Object
[][]
getImportWithRelationshipsWithLineage
(
ITestContext
context
)
throws
IOException
{
public
static
Object
[][]
getImportWithRelationshipsWithLineage
(
ITestContext
context
)
throws
IOException
,
AtlasBaseException
{
return
getZipSource
(
"stocks-rel-2.zip"
);
}
...
...
repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java
View file @
f6acb086
...
...
@@ -84,14 +84,14 @@ public class ReplicationEntityAttributeTest extends ExportImportTestBase {
@Inject
AtlasServerService
atlasServerService
;
private
AtlasEntityChangeNotifier
mockChangeNotifier
=
mock
(
AtlasEntityChangeNotifier
.
class
);
@Inject
private
AtlasEntityStoreV2
entityStore
;
private
ZipSource
zipSource
;
@BeforeClass
public
void
setup
()
throws
IOException
,
AtlasBaseException
{
basicSetup
(
typeDefStore
,
typeRegistry
);
entityStore
=
new
AtlasEntityStoreV2
(
deleteHandler
,
typeRegistry
,
mockChangeNotifier
,
graphMapper
);
createEntities
(
entityStore
,
ENTITIES_SUB_DIR
,
new
String
[]{
"db"
,
"table-columns"
});
AtlasType
refType
=
typeRegistry
.
getType
(
"Referenceable"
);
...
...
repository/src/test/java/org/apache/atlas/repository/tagpropagation/ClassificationPropagationTest.java
View file @
f6acb086
...
...
@@ -605,7 +605,7 @@ public class ClassificationPropagationTest {
}
}
public
static
ZipSource
getZipSource
(
String
fileName
)
throws
IOException
{
public
static
ZipSource
getZipSource
(
String
fileName
)
throws
IOException
,
AtlasBaseException
{
FileInputStream
fs
=
ZipFileResourceTestUtils
.
getFileInputStream
(
fileName
);
return
new
ZipSource
(
fs
);
}
...
...
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