Skip to content

Commit f591a30

Browse files
committed
Modifying tests to verify https://bugtrack.marklogic.com/57987
1 parent 5641dc8 commit f591a30

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

marklogic-client-api/src/test/java/com/marklogic/client/test/rows/TransformDocTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ public void transformThrowsError() {
168168
}
169169

170170
@Test
171-
@Ignore("See https://bugtrack.marklogic.com/57987")
172171
public void multipleJsonDocs() {
173172
if (!Common.markLogicIsVersion11OrHigher()) {
174173
return;

marklogic-client-api/src/test/java/com/marklogic/client/test/rows/ValidateDocTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public void testXmlSchemaWithLaxMode() {
7878
return uri;
7979
}).collect(Collectors.toList());
8080
assertEquals(uriCountToWrite, persistedUris.size());
81+
expectedUris.forEach(uri -> assertTrue("persistedUris does not contain "+uri, persistedUris.contains(uri)));
8182
}
8283

8384
@Test
@@ -124,6 +125,9 @@ public void testXmlSchemaWithStrictMode() {
124125
uris.add(rows.next().getString("uri"));
125126
}
126127
assertTrue(uris.size() == 4);
128+
for(int i=0;i<4;i++){
129+
assertTrue("uris does not contain /acme/"+i+".xml",uris.contains("/acme/"+i+".xml"));
130+
}
127131
}
128132

129133
@Test
@@ -248,6 +252,9 @@ public void testWithJsonSchema() {
248252
docMgr.read("/acme/doc1.json").next().getContent(new StringHandle()).toString().equals("{\"count\":1, \"total\":2}"));
249253
assertTrue("Contents for /acme/doc2.json not as expected.",
250254
docMgr.read("/acme/doc2.json").next().getContent(new StringHandle()).toString().equals("{\"count\":2, \"total\":3}"));
255+
256+
assertTrue("/acme/doc1.json is not returned.",expectedUris.contains("/acme/doc1.json"));
257+
assertTrue("/acme/doc2.json is not returned.",expectedUris.contains("/acme/doc2.json"));
251258
}
252259

253260
@Test
@@ -297,5 +304,9 @@ public void testWithJsonSchemaAndInvalidJsons() {
297304

298305
assertTrue("Document /acme/doc7.json should not exist",docMgr.exists("/acme/doc7.json") == null);
299306
assertTrue(expectedUris.size()==4);
307+
assertTrue("expectedUris does not contain /acme/doc1.json", expectedUris.contains("/acme/doc1.json"));
308+
assertTrue("expectedUris does not contain /acme/doc3.json",expectedUris.contains("/acme/doc3.json"));
309+
assertTrue("expectedUris does not contain /acme/doc5.json",expectedUris.contains("/acme/doc5.json"));
310+
assertTrue("expectedUris does not contain /acme/doc6.json",expectedUris.contains("/acme/doc6.json"));
300311
}
301312
}

0 commit comments

Comments
 (0)