aditya-gupta36 commented on code in PR #313:
URL: https://github.com/apache/atlas/pull/313#discussion_r2032877768


##########
webapp/src/test/java/org/apache/atlas/web/integration/BasicSearchIT.java:
##########
@@ -138,6 +138,11 @@ public void testDiscoveryWithSearchParameters(String 
jsonFile) {
                 LOG.info("TestDescription  :{}", 
testExpectation.testDescription);
                 LOG.info("SearchParameters :{}", 
testExpectation.searchParameters);
 
+                SearchParameters parameters = 
testExpectation.getSearchParameters();
+                if (parameters.getEntityFilters() == null || 
parameters.getEntityFilters().getAttributeName() == null) {
+                    continue;
+                }

Review Comment:
   Above has been modified. You can see the latest change.Have used Java 8 
there. 
   
   So no need of:  SearchParameters parameters = 
testExpectation.getSearchParameters();
                   if (parameters.getEntityFilters() == null || 
parameters.getEntityFilters().getAttributeName() == null) {
                       continue;
                   }
                   
    So basically, it will pass the TC for invalid attributes and operators. 
First it will get all search parameters from json(containing invalid values) 
and hit the API, will throw exception and will thus pass the TC:
    Logic: ry {
                               atlasClientV2.facetedSearch(params);
                           }
                           catch (AtlasServiceException e) {
                               
assertTrue(e.getMessage().contains("ATLAS-400-00-103"));
                           }



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@atlas.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to