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
479b58a9
Commit
479b58a9
authored
May 28, 2015
by
Harish Butani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG-37860: add a testcase to GraphBackedMetadataRepositoryTest
parent
087a7156
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
GraphBackedMetadataRepositoryTest.java
...a/repository/graph/GraphBackedMetadataRepositoryTest.java
+24
-0
No files found.
repository/src/test/java/org/apache/hadoop/metadata/repository/graph/GraphBackedMetadataRepositoryTest.java
View file @
479b58a9
...
@@ -379,6 +379,30 @@ public class GraphBackedMetadataRepositoryTest {
...
@@ -379,6 +379,30 @@ public class GraphBackedMetadataRepositoryTest {
Assert
.
assertEquals
(
row
.
getString
(
"name"
),
"Jane"
);
Assert
.
assertEquals
(
row
.
getString
(
"name"
),
"Jane"
);
}
}
@Test
(
dependsOnMethods
=
"testCreateEntity"
)
public
void
testBug37860
()
throws
Exception
{
String
dslQuery
=
"hive_table as t where name = 'bar' "
+
"database where name = 'foo' and description = 'foo database' select t"
;
System
.
out
.
println
(
"Executing dslQuery = "
+
dslQuery
);
String
jsonResults
=
discoveryService
.
searchByDSL
(
dslQuery
);
Assert
.
assertNotNull
(
jsonResults
);
JSONObject
results
=
new
JSONObject
(
jsonResults
);
Assert
.
assertEquals
(
results
.
length
(),
3
);
System
.
out
.
println
(
"results = "
+
results
);
Object
query
=
results
.
get
(
"query"
);
Assert
.
assertNotNull
(
query
);
JSONObject
dataType
=
results
.
getJSONObject
(
"dataType"
);
Assert
.
assertNotNull
(
dataType
);
JSONArray
rows
=
results
.
getJSONArray
(
"rows"
);
Assert
.
assertEquals
(
rows
.
length
(),
1
);
}
/**
/**
* Full text search requires GraphBackedSearchIndexer, and GraphBackedSearchIndexer can't be enabled in
* Full text search requires GraphBackedSearchIndexer, and GraphBackedSearchIndexer can't be enabled in
* GraphBackedDiscoveryServiceTest because of its test data. So, test for full text search is in
* GraphBackedDiscoveryServiceTest because of its test data. So, test for full text search is in
...
...
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