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
7ffbec1a
Commit
7ffbec1a
authored
Oct 04, 2018
by
Ashutosh Mestry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2897: Better handling of empty zip files. Unit test fix.
parent
016eaffa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
ExportServiceTest.java
...org/apache/atlas/repository/impexp/ExportServiceTest.java
+4
-11
No files found.
repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
View file @
7ffbec1a
...
@@ -218,7 +218,7 @@ public class ExportServiceTest extends ExportImportTestBase {
...
@@ -218,7 +218,7 @@ public class ExportServiceTest extends ExportImportTestBase {
assertNotNull
(
result
.
getSourceClusterName
());
assertNotNull
(
result
.
getSourceClusterName
());
}
}
@Test
@Test
(
expectedExceptions
=
AtlasBaseException
.
class
)
public
void
requestingEntityNotFound_NoData
()
throws
AtlasBaseException
,
IOException
{
public
void
requestingEntityNotFound_NoData
()
throws
AtlasBaseException
,
IOException
{
String
requestingIP
=
"1.0.0.0"
;
String
requestingIP
=
"1.0.0.0"
;
String
hostName
=
"root"
;
String
hostName
=
"root"
;
...
@@ -231,11 +231,7 @@ public class ExportServiceTest extends ExportImportTestBase {
...
@@ -231,11 +231,7 @@ public class ExportServiceTest extends ExportImportTestBase {
Assert
.
assertNull
(
result
.
getData
());
Assert
.
assertNull
(
result
.
getData
());
ByteArrayInputStream
bais
=
new
ByteArrayInputStream
(
baos
.
toByteArray
());
ByteArrayInputStream
bais
=
new
ByteArrayInputStream
(
baos
.
toByteArray
());
ZipSource
zipSource
=
new
ZipSource
(
bais
);
new
ZipSource
(
bais
);
assertNotNull
(
exportService
);
assertNotNull
(
zipSource
.
getCreationOrder
());
Assert
.
assertFalse
(
zipSource
.
hasNext
());
}
}
@Test
@Test
...
@@ -306,14 +302,11 @@ public class ExportServiceTest extends ExportImportTestBase {
...
@@ -306,14 +302,11 @@ public class ExportServiceTest extends ExportImportTestBase {
AtlasExportResult
.
OperationStatus
.
FAIL
));
AtlasExportResult
.
OperationStatus
.
FAIL
));
}
}
@Test
@Test
(
expectedExceptions
=
AtlasBaseException
.
class
)
public
void
requestingExportOfNonExistentEntity_ReturnsFailure
()
throws
Exception
{
public
void
requestingExportOfNonExistentEntity_ReturnsFailure
()
throws
Exception
{
AtlasExportRequest
request
=
getRequestForEmployee
();
AtlasExportRequest
request
=
getRequestForEmployee
();
tamperEmployeeRequest
(
request
);
tamperEmployeeRequest
(
request
);
ZipSource
zipSource
=
runExportWithParameters
(
request
);
runExportWithParameters
(
request
);
assertNotNull
(
zipSource
.
getCreationOrder
());
assertEquals
(
zipSource
.
getCreationOrder
().
size
(),
0
);
}
}
@Test
@Test
...
...
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