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
The following commit(s) were added to refs/heads/trunk by this push:
new dea095688e OAK-11936: Allow updating the inference config via JMX -
line ends in test case
dea095688e is described below
commit dea095688e37c9a5c0a99694cc8d0d42f2de831a
Author: Julian Reschke <[email protected]>
AuthorDate: Mon Oct 27 08:37:00 2025 +0100
OAK-11936: Allow updating the inference config via JMX - line ends in test
case
---
.../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)