pareshddevalia commented on code in PR #313: URL: https://github.com/apache/atlas/pull/313#discussion_r2032467535
########## webapp/src/test/java/org/apache/atlas/web/integration/BasicSearchIT.java: ########## @@ -224,6 +245,50 @@ public void testSavedSearch(String jsonFile) { } } + @Test(dataProvider = "attributeSearchJSONNamesInvalidOperator") + public void testAttributeSearchInvalidOperator(String jsonFile) { + try { + BasicSearchParametersWithExpectation[] testExpectations = TestResourceFileUtils.readObjectFromJson(jsonFile, BasicSearchParametersWithExpectation[].class); + assertNotNull(testExpectations); + Arrays + .stream(testExpectations) + .map(testExpectation -> testExpectation.getSearchParameters()) + .filter(params -> params.getEntityFilters() != null && params.getEntityFilters().getAttributeName() != null) + .forEach(params -> { + try { + atlasClientV2.facetedSearch(params); + } + catch (AtlasServiceException e) { + assertTrue(e.getMessage().contains("ATLAS-400-00-103")); + } + }); + } catch (IOException e) { + fail(e.getMessage()); + } + } + + @Test(dataProvider = "attributeSearchJSONNamesEmptyAttribute") + public void testAttributeSearchEmptyAttribute(String jsonFile) { + try { + BasicSearchParametersWithExpectation[] testExpectations = TestResourceFileUtils.readObjectFromJson(jsonFile, BasicSearchParametersWithExpectation[].class); + assertNotNull(testExpectations); + Arrays + .stream(testExpectations) + .map(testExpectation -> testExpectation.getSearchParameters()) + .filter(params -> params.getEntityFilters() != null && params.getEntityFilters().getAttributeName() != null) Review Comment: In Both the unit test it has same filter condition. -- 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