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
6 years ago
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
Show 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;
...
@@ -26,6 +26,7 @@ import org.apache.atlas.model.impexp.AtlasExportRequest;
import
org.apache.atlas.model.impexp.AtlasExportResult
;
import
org.apache.atlas.model.impexp.AtlasExportResult
;
import
org.apache.atlas.model.instance.AtlasEntity
;
import
org.apache.atlas.model.instance.AtlasEntity
;
import
org.apache.atlas.model.instance.AtlasObjectId
;
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.model.typedef.AtlasTypesDef
;
import
org.apache.atlas.repository.graph.AtlasGraphProvider
;
import
org.apache.atlas.repository.graph.AtlasGraphProvider
;
import
org.apache.atlas.repository.store.bootstrap.AtlasTypeDefStoreInitializer
;
import
org.apache.atlas.repository.store.bootstrap.AtlasTypeDefStoreInitializer
;
...
@@ -84,9 +85,11 @@ public class ExportServiceTest extends ExportImportTestBase {
...
@@ -84,9 +85,11 @@ public class ExportServiceTest extends ExportImportTestBase {
@Inject
@Inject
private
ExportImportAuditService
auditService
;
private
ExportImportAuditService
auditService
;
@Inject
private
AtlasEntityStoreV2
entityStore
;
private
DeleteHandlerV1
deleteHandler
=
mock
(
SoftDeleteHandlerV1
.
class
);;
private
DeleteHandlerV1
deleteHandler
=
mock
(
SoftDeleteHandlerV1
.
class
);;
private
AtlasEntityChangeNotifier
mockChangeNotifier
=
mock
(
AtlasEntityChangeNotifier
.
class
);
private
AtlasEntityChangeNotifier
mockChangeNotifier
=
mock
(
AtlasEntityChangeNotifier
.
class
);
private
AtlasEntityStoreV2
entityStore
;
@BeforeTest
@BeforeTest
public
void
setupTest
()
throws
IOException
,
AtlasBaseException
{
public
void
setupTest
()
throws
IOException
,
AtlasBaseException
{
...
@@ -106,11 +109,12 @@ public class ExportServiceTest extends ExportImportTestBase {
...
@@ -106,11 +109,12 @@ public class ExportServiceTest extends ExportImportTestBase {
typeDefStore
.
createTypesDef
(
typesToCreate
);
typeDefStore
.
createTypesDef
(
typesToCreate
);
}
}
AtlasEntity
.
AtlasEntitiesWithExtInfo
hrDept
=
TestUtilsV2
.
createDeptEg2
();
AtlasEntity
.
AtlasEntitiesWithExtInfo
deptEg2
=
TestUtilsV2
.
createDeptEg2
();
AtlasEntityStream
entityStream
=
new
AtlasEntityStream
(
deptEg2
);
AtlasEntityStream
entityStream
=
new
AtlasEntityStream
(
hrDept
);
EntityMutationResponse
emr
=
entityStore
.
createOrUpdate
(
entityStream
,
false
);
entityStore
.
createOrUpdate
(
entityStream
,
false
);
assertNotNull
(
emr
);
LOG
.
debug
(
"==> setupSampleData: "
,
AtlasEntity
.
dumpObjects
(
hrDept
.
getEntities
(),
null
).
toString
());
assertNotNull
(
emr
.
getCreatedEntities
());
assertTrue
(
emr
.
getCreatedEntities
().
size
()
>
0
);
}
}
@AfterClass
@AfterClass
...
...
This diff is collapsed.
Click to expand it.
repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java
View file @
f6acb086
...
@@ -213,7 +213,7 @@ public class ImportServiceTest extends ExportImportTestBase {
...
@@ -213,7 +213,7 @@ public class ImportServiceTest extends ExportImportTestBase {
}
}
@DataProvider
(
name
=
"stocks-legacy"
)
@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"
);
return
getZipSource
(
"stocks.zip"
);
}
}
...
@@ -254,7 +254,7 @@ public class ImportServiceTest extends ExportImportTestBase {
...
@@ -254,7 +254,7 @@ public class ImportServiceTest extends ExportImportTestBase {
}
}
@DataProvider
(
name
=
"stocks-glossary"
)
@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"
);
return
getZipSource
(
"stocks-glossary.zip"
);
}
}
...
@@ -298,12 +298,12 @@ public class ImportServiceTest extends ExportImportTestBase {
...
@@ -298,12 +298,12 @@ public class ImportServiceTest extends ExportImportTestBase {
}
}
@DataProvider
(
name
=
"relationshipLineage"
)
@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"
);
return
getZipSource
(
"rel-lineage.zip"
);
}
}
@DataProvider
(
name
=
"tag-prop-2"
)
@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"
);
return
getZipSource
(
"tag-prop-2.zip"
);
}
}
...
@@ -316,7 +316,7 @@ public class ImportServiceTest extends ExportImportTestBase {
...
@@ -316,7 +316,7 @@ public class ImportServiceTest extends ExportImportTestBase {
}
}
@DataProvider
(
name
=
"relationship"
)
@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"
);
return
getZipSource
(
"stocks-rel-2.zip"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java
View file @
f6acb086
...
@@ -84,14 +84,14 @@ public class ReplicationEntityAttributeTest extends ExportImportTestBase {
...
@@ -84,14 +84,14 @@ public class ReplicationEntityAttributeTest extends ExportImportTestBase {
@Inject
@Inject
AtlasServerService
atlasServerService
;
AtlasServerService
atlasServerService
;
private
AtlasEntityChangeNotifier
mockChangeNotifier
=
mock
(
AtlasEntityChangeNotifier
.
class
);
@Inject
private
AtlasEntityStoreV2
entityStore
;
private
AtlasEntityStoreV2
entityStore
;
private
ZipSource
zipSource
;
private
ZipSource
zipSource
;
@BeforeClass
@BeforeClass
public
void
setup
()
throws
IOException
,
AtlasBaseException
{
public
void
setup
()
throws
IOException
,
AtlasBaseException
{
basicSetup
(
typeDefStore
,
typeRegistry
);
basicSetup
(
typeDefStore
,
typeRegistry
);
entityStore
=
new
AtlasEntityStoreV2
(
deleteHandler
,
typeRegistry
,
mockChangeNotifier
,
graphMapper
);
createEntities
(
entityStore
,
ENTITIES_SUB_DIR
,
new
String
[]{
"db"
,
"table-columns"
});
createEntities
(
entityStore
,
ENTITIES_SUB_DIR
,
new
String
[]{
"db"
,
"table-columns"
});
AtlasType
refType
=
typeRegistry
.
getType
(
"Referenceable"
);
AtlasType
refType
=
typeRegistry
.
getType
(
"Referenceable"
);
...
...
This diff is collapsed.
Click to expand it.
repository/src/test/java/org/apache/atlas/repository/tagpropagation/ClassificationPropagationTest.java
View file @
f6acb086
...
@@ -605,7 +605,7 @@ public class ClassificationPropagationTest {
...
@@ -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
);
FileInputStream
fs
=
ZipFileResourceTestUtils
.
getFileInputStream
(
fileName
);
return
new
ZipSource
(
fs
);
return
new
ZipSource
(
fs
);
}
}
...
...
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