diff --git a/marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestAppServerConstraints.java b/marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestAppServerConstraints.java index 68c2dd63b..60077e374 100644 --- a/marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestAppServerConstraints.java +++ b/marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestAppServerConstraints.java @@ -445,10 +445,7 @@ public void testNegativePointInvalidValue() throws Exception { result = e.getMessage(); } - String expectedResult = markLogicVersion.getMajor() <= 11 ? - "[Invalid text, cannot parse geospatial point from '12,A'.]" : - "arg2 is not of type xs:double"; - + String expectedResult = "[Invalid text, cannot parse geospatial point from '12,A'.]"; assertTrue(result.contains(expectedResult), "Unexpected result: " + result); } @@ -626,14 +623,8 @@ public void testNegativePointInvalidValue_ChildConstraint() throws Exception { result = ex.getMessage(); } - String expectedResult = markLogicVersion.getMajor() <= 11 ? - "[Invalid text, cannot parse geospatial point from '12,A'.]" : - "arg2 is not of type xs:double"; - - assertTrue( - result.contains(expectedResult), - "Unexpected result: " + result - ); + String expectedResult = "[Invalid text, cannot parse geospatial point from '12,A'.]"; + assertTrue(result.contains(expectedResult), "Unexpected result: " + result); } @Test @@ -820,10 +811,7 @@ public void testNegativePointInvalidValue_GeoElementConstraint() throws Exceptio result = e.getMessage(); } - String expectedResult = markLogicVersion.getMajor() <= 11 ? - "[Invalid text, cannot parse geospatial point from '12,A'.]" : - "arg2 is not of type xs:double"; - + String expectedResult = "[Invalid text, cannot parse geospatial point from '12,A'.]"; assertTrue(result.contains(expectedResult), "Unexpected result: " + result); } @@ -1012,10 +1000,7 @@ public void testNegativePointInvalidValue_GeoElemPairConstraint() throws Excepti result = e.getMessage(); } - String expectedResult = markLogicVersion.getMajor() <= 11 ? - "[Invalid text, cannot parse geospatial point from '-12,A'.]" : - "arg2 is not of type xs:double"; - + String expectedResult = "[Invalid text, cannot parse geospatial point from '-12,A'.]"; assertTrue(result.contains(expectedResult), "Unexpected result: " + result); } diff --git a/marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestOpticOnViews.java b/marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestOpticOnViews.java index da4cbab57..fc2d4e77c 100644 --- a/marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestOpticOnViews.java +++ b/marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestOpticOnViews.java @@ -2213,10 +2213,7 @@ public void testFromSqlUnionSelectOrderbyLimitOffset() { .orderBy(op.desc("id")) .limit(3) .offset(1) - // This is no longer working on MarkLogic 12 nightly. Neither op.col("name") works now op.schemaCol("opticFunctionalTest.detail.name"). - // We get an error of "Invalid arguments: expression column myName with undefined expression". - //.select(p.as("myName", p.col("name"))) - ; + .select(op.as("myName", op.col("name"))); JacksonHandle jacksonHandle = new JacksonHandle(); jacksonHandle.setMimetype("application/json"); @@ -2225,8 +2222,8 @@ public void testFromSqlUnionSelectOrderbyLimitOffset() { JsonNode rows = result.path("rows"); assertEquals(2, rows.size()); - assertEquals("Detail 5", rows.path(0).path("opticFunctionalTest.detail.name").path("value").asText()); - assertEquals("Detail 4", rows.path(1).path("opticFunctionalTest.detail.name").path("value").asText()); + assertEquals("Detail 5", rows.path(0).path("myName").path("value").asText()); + assertEquals("Detail 4", rows.path(1).path("myName").path("value").asText()); } diff --git a/marklogic-client-api/src/test/java/com/marklogic/client/test/rows/FromDocDescriptorsTest.java b/marklogic-client-api/src/test/java/com/marklogic/client/test/rows/FromDocDescriptorsTest.java index 17f5b62f2..85d34ab54 100644 --- a/marklogic-client-api/src/test/java/com/marklogic/client/test/rows/FromDocDescriptorsTest.java +++ b/marklogic-client-api/src/test/java/com/marklogic/client/test/rows/FromDocDescriptorsTest.java @@ -51,6 +51,9 @@ public void insertDocsWithUserWithDefaultCollectionsAndPermissions() { .write()); // Verify first doc inherits the default collections and permissions + // 2024-05-16 This started failing in the 15th due to the existence of the "collections" and "permissions" + // columns having null values. The server treats that as "Don't assign any collections/permissions" and thus + // the user's default ones are not applied. verifyJsonDoc(firstUri, doc -> assertEquals("world", doc.get("hello").asText())); verifyMetadata(firstUri, metadata -> { DocumentMetadataHandle.DocumentPermissions perms = metadata.getPermissions();