This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/1.22 by this push:
new f67ece7595 OAK-10653: BasicDocumentStore: handle
DocumentStoreException on ds.create (#1310)
f67ece7595 is described below
commit f67ece7595a04d70485bec93067a61a1701e2848
Author: Julian Reschke <[email protected]>
AuthorDate: Thu Feb 15 15:00:32 2024 +0100
OAK-10653: BasicDocumentStore: handle DocumentStoreException on ds.create
(#1310)
* OAK-10653: BasicDocumentStore: handle DocumentStoreException on ds.create
* OAK-10653: BasicDocumentStore: handle DocumentStoreException on ds.create
---
.../plugins/document/BasicDocumentStoreTest.java | 23 +++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BasicDocumentStoreTest.java
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BasicDocumentStoreTest.java
index 517305dc40..3d6b4164ae 100644
---
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BasicDocumentStoreTest.java
+++
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BasicDocumentStoreTest.java
@@ -509,15 +509,20 @@ public class BasicDocumentStoreTest extends
AbstractDocumentStoreTest {
String pval = generateString(test, true);
UpdateOp up = new UpdateOp(id, true);
up.set("foo", pval);
- boolean success = super.ds.create(Collection.NODES,
Collections.singletonList(up));
- if (success) {
- // check that we really can read it
- NodeDocument findme = super.ds.find(Collection.NODES, id, 0);
- assertNotNull("failed to retrieve previously stored document",
findme);
- super.ds.remove(Collection.NODES, id);
- min = test;
- last = test;
- } else {
+ try {
+ boolean success = super.ds.create(Collection.NODES,
Collections.singletonList(up));
+ if (success) {
+ // check that we really can read it
+ NodeDocument findme = super.ds.find(Collection.NODES, id,
0);
+ assertNotNull("failed to retrieve previously stored
document", findme);
+ super.ds.remove(Collection.NODES, id);
+ min = test;
+ last = test;
+ } else {
+ max = test;
+ }
+ } catch (DocumentStoreException ex) {
+ LOG.info("create with property size "+ test + " failed for " +
super.dsname, ex);
max = test;
}
}