Skip to content

Commit 0ad163c

Browse files
authored
Merge pull request #1663 from marklogic/feature/nightly-fixes
Updating Optic tests based on Jenkins failures
2 parents 577f7f4 + 8b719a3 commit 0ad163c

File tree

3 files changed

+11
-26
lines changed

3 files changed

+11
-26
lines changed

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestAppServerConstraints.java

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,7 @@ public void testNegativePointInvalidValue() throws Exception {
445445
result = e.getMessage();
446446
}
447447

448-
String expectedResult = markLogicVersion.getMajor() <= 11 ?
449-
"<search:warning id=\"SEARCH-IGNOREDQTEXT\">[Invalid text, cannot parse geospatial point from '12,A'.]</search:warning>" :
450-
"arg2 is not of type xs:double";
451-
448+
String expectedResult = "<search:warning id=\"SEARCH-IGNOREDQTEXT\">[Invalid text, cannot parse geospatial point from '12,A'.]</search:warning>";
452449
assertTrue(result.contains(expectedResult), "Unexpected result: " + result);
453450
}
454451

@@ -626,14 +623,8 @@ public void testNegativePointInvalidValue_ChildConstraint() throws Exception {
626623
result = ex.getMessage();
627624
}
628625

629-
String expectedResult = markLogicVersion.getMajor() <= 11 ?
630-
"<search:warning id=\"SEARCH-IGNOREDQTEXT\">[Invalid text, cannot parse geospatial point from '12,A'.]</search:warning>" :
631-
"arg2 is not of type xs:double";
632-
633-
assertTrue(
634-
result.contains(expectedResult),
635-
"Unexpected result: " + result
636-
);
626+
String expectedResult = "<search:warning id=\"SEARCH-IGNOREDQTEXT\">[Invalid text, cannot parse geospatial point from '12,A'.]</search:warning>";
627+
assertTrue(result.contains(expectedResult), "Unexpected result: " + result);
637628
}
638629

639630
@Test
@@ -820,10 +811,7 @@ public void testNegativePointInvalidValue_GeoElementConstraint() throws Exceptio
820811
result = e.getMessage();
821812
}
822813

823-
String expectedResult = markLogicVersion.getMajor() <= 11 ?
824-
"<search:warning id=\"SEARCH-IGNOREDQTEXT\">[Invalid text, cannot parse geospatial point from '12,A'.]</search:warning>" :
825-
"arg2 is not of type xs:double";
826-
814+
String expectedResult = "<search:warning id=\"SEARCH-IGNOREDQTEXT\">[Invalid text, cannot parse geospatial point from '12,A'.]</search:warning>";
827815
assertTrue(result.contains(expectedResult), "Unexpected result: " + result);
828816
}
829817

@@ -1012,10 +1000,7 @@ public void testNegativePointInvalidValue_GeoElemPairConstraint() throws Excepti
10121000
result = e.getMessage();
10131001
}
10141002

1015-
String expectedResult = markLogicVersion.getMajor() <= 11 ?
1016-
"<search:warning id=\"SEARCH-IGNOREDQTEXT\">[Invalid text, cannot parse geospatial point from '-12,A'.]</search:warning>" :
1017-
"arg2 is not of type xs:double";
1018-
1003+
String expectedResult = "<search:warning id=\"SEARCH-IGNOREDQTEXT\">[Invalid text, cannot parse geospatial point from '-12,A'.]</search:warning>";
10191004
assertTrue(result.contains(expectedResult), "Unexpected result: " + result);
10201005
}
10211006

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestOpticOnViews.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,10 +2213,7 @@ public void testFromSqlUnionSelectOrderbyLimitOffset() {
22132213
.orderBy(op.desc("id"))
22142214
.limit(3)
22152215
.offset(1)
2216-
// This is no longer working on MarkLogic 12 nightly. Neither op.col("name") works now op.schemaCol("opticFunctionalTest.detail.name").
2217-
// We get an error of "Invalid arguments: expression column myName with undefined expression".
2218-
//.select(p.as("myName", p.col("name")))
2219-
;
2216+
.select(op.as("myName", op.col("name")));
22202217

22212218
JacksonHandle jacksonHandle = new JacksonHandle();
22222219
jacksonHandle.setMimetype("application/json");
@@ -2225,8 +2222,8 @@ public void testFromSqlUnionSelectOrderbyLimitOffset() {
22252222
JsonNode rows = result.path("rows");
22262223

22272224
assertEquals(2, rows.size());
2228-
assertEquals("Detail 5", rows.path(0).path("opticFunctionalTest.detail.name").path("value").asText());
2229-
assertEquals("Detail 4", rows.path(1).path("opticFunctionalTest.detail.name").path("value").asText());
2225+
assertEquals("Detail 5", rows.path(0).path("myName").path("value").asText());
2226+
assertEquals("Detail 4", rows.path(1).path("myName").path("value").asText());
22302227
}
22312228

22322229

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public void insertDocsWithUserWithDefaultCollectionsAndPermissions() {
5151
.write());
5252

5353
// Verify first doc inherits the default collections and permissions
54+
// 2024-05-16 This started failing in the 15th due to the existence of the "collections" and "permissions"
55+
// columns having null values. The server treats that as "Don't assign any collections/permissions" and thus
56+
// the user's default ones are not applied.
5457
verifyJsonDoc(firstUri, doc -> assertEquals("world", doc.get("hello").asText()));
5558
verifyMetadata(firstUri, metadata -> {
5659
DocumentMetadataHandle.DocumentPermissions perms = metadata.getPermissions();

0 commit comments

Comments
 (0)