Skip to content

Commit 71456db

Browse files
Ajit GeorgeAjit George
authored andcommitted
Added changed message, new attributes from develop branch
1 parent 4e00432 commit 71456db

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

test-complete/src/test/java/com/marklogic/client/functionaltest/ConnectedRESTQA.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ public static void includeElementField(String dbName, String field_name, String
14481448
setDatabaseFieldProperties(dbName,field_name,"included-element",childNode);
14491449

14501450
}
1451-
public static void includeElementFieldWithWeight(String dbName, String field_name, String namespace, String elementName, double weight) throws Exception{
1451+
public static void includeElementFieldWithWeight(String dbName, String field_name, String namespace, String elementName, double weight, String attrNS_URI, String attr_localname, String attr_value) throws Exception{
14521452

14531453
ObjectMapper mapper = new ObjectMapper();
14541454
// ObjectNode mainNode = mapper.createObjectNode();
@@ -1458,10 +1458,12 @@ public static void includeElementFieldWithWeight(String dbName, String field_nam
14581458
childNodeObject.put( "namespace-uri", namespace);
14591459
childNodeObject.put( "localname", elementName);
14601460
childNodeObject.put("weight", weight);
1461+
// These 3 are new fields that have been added as of 8.0.2 from 03/20/2015 in the Management API.
1462+
childNodeObject.put( "attribute-namespace-uri", attrNS_URI);
1463+
childNodeObject.put( "attribute-localname", attr_localname);
1464+
childNodeObject.put( "attribute-value", attr_value);
14611465
arrNode.add(childNodeObject);
1462-
childNode.putArray("included-element").addAll(arrNode);
1463-
// mainNode.put("included-elements", childNode);
1464-
// System.out.println( childNode.toString());
1466+
childNode.putArray("included-element").addAll(arrNode);
14651467
setDatabaseFieldProperties(dbName,field_name,"included-element",childNode);
14661468

14671469
}
@@ -1476,7 +1478,7 @@ public static void setupAppServicesConstraint(String dbName) throws Exception {
14761478
addRangeElementAttributeIndex(dbName, "decimal", "http://cloudbank.com", "price", "", "amt", "http://marklogic.com/collation/");
14771479
enableTrailingWildcardSearches(dbName);
14781480
addFieldExcludeRoot(dbName, "para");
1479-
includeElementFieldWithWeight(dbName, "para", "", "p", 5);
1481+
includeElementFieldWithWeight(dbName, "para", "", "p", 5,"","","");
14801482
addRangePathIndex(dbName, "string", "/Employee/fn", "http://marklogic.com/collation/", "ignore");
14811483
addRangePathIndex(dbName, "int", "/root/popularity", "", "ignore");
14821484
addRangePathIndex(dbName, "decimal", "//@amt", "", "ignore");

test-complete/src/test/java/com/marklogic/client/functionaltest/TestBiTemporal.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ public static void tearDownAfterClass() throws Exception {
136136

137137
// Delete database first. Otherwise axis and collection cannot be deleted
138138
tearDownJavaRESTServer(dbName, fNames, restServerName);
139+
deleteRESTUser("eval-user");
140+
deleteUserRole("test-eval");
139141

140142
// Temporal collection needs to be delete before temporal axis associated
141143
// with it can be deleted
@@ -1837,7 +1839,7 @@ public void testSystemTimeUsingInvalidTime() throws Exception {
18371839
System.out.println(message);
18381840
System.out.println(statusCode);
18391841

1840-
assertTrue("Error Message", message.equals("TEMPORAL-SYSTEMTIME-BACKWARDS"));
1842+
assertTrue("Error Message", message.equals("TEMPORAL-OPNOTAFTERLSQT"));
18411843
assertTrue("Status code", (statusCode == 400));
18421844
}
18431845

test-complete/src/test/java/com/marklogic/client/functionaltest/TestResponseTransform.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public void testResponseTransformInvalid() throws IOException, ParserConfigurati
196196
System.out.println(exception);
197197
}
198198

199-
String expectedException = "Local message: search failed: Bad Request. Server Message: XDMP-MODNOTFOUND: (err:XQST0059) Module /marklogic.rest.transform/foo/assets/transform.xqy not found";
199+
String expectedException = "Local message: search failed: Bad Request. Server Message: RESTAPI-INVALIDREQ: (err:FOER0000) Invalid request: reason: Extension foo does not exist.";
200200
assertTrue("exception is not thrown", exception.contains(expectedException));
201201
//bug 22356
202202
assertTrue("Value should be null", resultsHandle.get()==null);

0 commit comments

Comments
 (0)