Skip to content

Commit 7ad05a0

Browse files
georgeajitgeorgeajit
authored andcommitted
#1055 - Added validation when RowManager returns results in FileHandle.
1 parent cbd8430 commit 7ad05a0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestOpticOnLiterals.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,21 @@ public void testJoinLeftOuter() throws KeyManagementException, NoSuchAlgorithmEx
560560
assertEquals("Row 5 rowId value incorrect", "5", node.path("rowId").path("value").asText());
561561
assertEquals("Row 5 desc value incorrect", "circle", node.path("desc").path("value").asText());
562562
assertFalse("Row 5 colorDesc should be null", node.path("colorDesc").isNull());
563+
// To verify issue 1055.
564+
FileHandle fh = new FileHandle();
565+
rowMgr.resultDoc(output, fh);
566+
File file = fh.get();
567+
String fileContents = convertFileToString(file);
568+
569+
ObjectMapper mapper = new ObjectMapper();
570+
JsonNode fromFile = mapper.readTree(file).path("rows");
571+
System.out.println(fileContents);
572+
573+
assertEquals("Five nodes not returned from testJoinLeftOuter method", 5, fromFile.size());
574+
JsonNode nodeFile = fromFile.path(0);
575+
assertEquals("Row 1 rowId value incorrect", "1", nodeFile.path("rowId").path("value").asText());
576+
assertEquals("Row 1 desc value incorrect", "ball", nodeFile.path("desc").path("value").asText());
577+
assertEquals("Row 1 colorDesc value incorrect", "red", nodeFile.path("colorDesc").path("value").asText());
563578
}
564579

565580
/*

0 commit comments

Comments
 (0)