You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2025/10/28 12:18:24 UTC
(jackrabbit-oak) 03/03: Reapply "OAK-11936: Allow updating the inference config via JMX - line ends in test case"
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit c01a46305ba8430841ef607426634ac71ef11de4
Author: Julian Reschke <re...@apache.org>
AuthorDate: Tue Oct 28 13:11:28 2025 +0100
Reapply "OAK-11936: Allow updating the inference config via JMX - line ends in test case"
This reverts commit 09a603ba0bac80f5907902b36443f158a21f8aab.
---
.../org/apache/jackrabbit/oak/json/JsonNodeBuilderTest.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/json/JsonNodeBuilderTest.java b/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/json/JsonNodeBuilderTest.java
index 5abc7094ef..f03b7621be 100644
--- a/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/json/JsonNodeBuilderTest.java
+++ b/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/json/JsonNodeBuilderTest.java
@@ -55,6 +55,7 @@ public class JsonNodeBuilderTest {
JsonNodeBuilder.addOrReplace(ns, "/test", "nt:test", json.toString());
String json2 = JsonUtils.nodeStateToJson(ns.getRoot(), 5);
json2 = json2.replaceAll("jcr:uuid\" : \".*\"", "jcr:uuid\" : \"...\"");
+ json2 = json2.replace("\r\n", "\n");
assertEquals("{\n"
+ " \"test\" : {\n"
+ " \"queryPaths\" : \"/same\",\n"
@@ -88,7 +89,7 @@ public class JsonNodeBuilderTest {
+ " \"jcr:primaryType\" : \"nt:test\"\n"
+ " }\n"
+ " }\n"
- + "}", JsonUtils.nodeStateToJson(ns.getRoot(), 5));
+ + "}", JsonUtils.nodeStateToJson(ns.getRoot(), 5).replace("\r\n", "\n"));
}
@Test
@@ -114,7 +115,7 @@ public class JsonNodeBuilderTest {
+ " \"jcr:primaryType\" : \"nt:test\"\n"
+ " }\n"
+ " }\n"
- + "}", JsonUtils.nodeStateToJson(ns.getRoot(), 5));
+ + "}", JsonUtils.nodeStateToJson(ns.getRoot(), 5).replace("\r\n", "\n"));
json = JsonObject.fromJson(
"{\"number\":1," +
@@ -135,13 +136,13 @@ public class JsonNodeBuilderTest {
+ " \"jcr:primaryType\" : \"nt:test\"\n"
+ " }\n"
+ " }\n"
- + "}", JsonUtils.nodeStateToJson(ns.getRoot(), 5));
+ + "}", JsonUtils.nodeStateToJson(ns.getRoot(), 5).replace("\r\n", "\n"));
}
@Test
public void illegalNodeTypesAreProhibited() {
String simpleJson = "{\"property\": \"value\"}";
-
+
IllegalStateException exception = assertThrows(
IllegalStateException.class,
() -> JsonNodeBuilder.addOrReplace(ns, "/test", "invalid/nodetype", simpleJson)
@@ -152,7 +153,7 @@ public class JsonNodeBuilderTest {
@Test
public void removingEntriesIsProhibited() {
String jsonWithNull = "{\"nullProperty\": null}";
-
+
IllegalArgumentException exception = assertThrows(
IllegalArgumentException.class,
() -> JsonNodeBuilder.addOrReplace(ns, "/test", "nt:unstructured", jsonWithNull)