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
f640da72
Commit
f640da72
authored
8 years ago
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1516: fix unit test failure in DefaultMetadataServiceTest.testSpecialCharacters()
parent
5d8fae55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
DefaultMetadataServiceTest.java
.../org/apache/atlas/service/DefaultMetadataServiceTest.java
+2
-2
Referenceable.java
.../main/java/org/apache/atlas/typesystem/Referenceable.java
+1
-1
No files found.
repository/src/test/java/org/apache/atlas/service/DefaultMetadataServiceTest.java
View file @
f640da72
...
...
@@ -215,7 +215,7 @@ public class DefaultMetadataServiceTest {
//verify that entity can be created with reserved characters in string value, array value and map key and value
Referenceable
entity
=
new
Referenceable
(
typeDefinition
.
typeName
);
entity
.
set
(
strAttrName
,
randomStrWithReservedChars
());
entity
.
set
(
arrayAttrName
,
new
String
[]{
randomStrWithReservedChars
()
});
entity
.
set
(
arrayAttrName
,
new
ArrayList
<
String
>()
{{
add
(
randomStrWithReservedChars
());
}
});
entity
.
set
(
mapAttrName
,
new
HashMap
<
String
,
String
>()
{{
put
(
randomStrWithReservedChars
(),
randomStrWithReservedChars
());
}});
...
...
@@ -244,7 +244,7 @@ public class DefaultMetadataServiceTest {
Referenceable
newActual
=
new
Referenceable
(
expected
.
getId
(),
actual
.
getTypeName
(),
actual
.
getValuesMap
(),
traits
,
traitsMap
);
assertEquals
(
InstanceSerialization
.
toJson
(
newActual
,
true
),
InstanceSerialization
.
toJson
(
expected
,
true
)
);
assertEquals
(
newActual
,
expected
);
}
private
String
randomStrWithReservedChars
()
{
...
...
This diff is collapsed.
Click to expand it.
typesystem/src/main/java/org/apache/atlas/typesystem/Referenceable.java
View file @
f640da72
...
...
@@ -162,7 +162,7 @@ public class Referenceable extends Struct implements IReferenceableInstance {
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
()
||
!
super
.
equalsContents
(
o
)
)
return
false
;
Referenceable
that
=
(
Referenceable
)
o
;
return
Objects
.
equals
(
id
,
that
.
id
)
&&
Objects
.
equals
(
traits
,
that
.
traits
)
&&
...
...
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