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 mr...@apache.org on 2022/11/24 07:34:49 UTC
[jackrabbit-oak] branch trunk updated: fixed flaky test using JsonParser
This is an automated email from the ASF dual-hosted git repository.
mreutegg 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 321e336e40 fixed flaky test using JsonParser
new d0c2e82ce4 Merge pull request #763 from tt0suzy/OAK-10010
321e336e40 is described below
commit 321e336e40cfc4a0b94c3bda895ad5506d53cec4
Author: Yihen Liu <tt...@wirelessprv-10-192-162-3.near.illinois.edu>
AuthorDate: Wed Nov 23 11:35:55 2022 -0600
fixed flaky test using JsonParser
---
.../apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
index ecb63c2928..d662c0b8da 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
@@ -35,6 +35,7 @@ import org.apache.jackrabbit.oak.commons.json.JsopTokenizer;
import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore;
import org.junit.Rule;
import org.junit.Test;
+import com.google.gson.JsonParser;
/**
* A simple randomized dual-instance test.
@@ -321,11 +322,12 @@ public class RandomizedClusterTest {
assertTrue("path: " + p + " is supposed to exist",
mk.nodeExists(p, head));
}
+ JsonParser parser = new JsonParser();
String expected = "{\":childNodeCount\":0,\"x\":" + value + "}";
String result = mk.getNodes(p, head, 0, 0, Integer.MAX_VALUE, null);
expected = normalize(expected);
result = normalize(result);
- assertEquals(expected, result);
+ assertEquals(parser.parse(expected), parser.parse(result));
return true;
}