You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2026/06/19 12:26:35 UTC
(juneau) branch master updated: test: accept either graceful depth-failure message in MsgPack conformance test (CI stack-size flake)
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 4d381312f9 test: accept either graceful depth-failure message in MsgPack conformance test (CI stack-size flake)
4d381312f9 is described below
commit 4d381312f919439ecd36f017881ee4dd2f3f23b0
Author: James Bognar <ja...@apache.org>
AuthorDate: Fri Jun 19 08:26:30 2026 -0400
test: accept either graceful depth-failure message in MsgPack conformance test (CI stack-size flake)
---
.../juneau/marshall/msgpack/MsgPackConformance_Test.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/msgpack/MsgPackConformance_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/msgpack/MsgPackConformance_Test.java
index 5c2f256d38..011230cb0d 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/msgpack/MsgPackConformance_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/msgpack/MsgPackConformance_Test.java
@@ -214,8 +214,16 @@ class MsgPackConformance_Test extends TestBase {
for (var i = 0; i < 1100; i++)
sb.append("91 ");
sb.append("00");
- assertThrowsWithMessage(ParseException.class, "Maximum parse depth exceeded",
- () -> parse(sb.toString(), Object.class));
+ // The contract is graceful failure (a ParseException, NOT a raw StackOverflowError). Which guard
+ // trips first is stack-size dependent: on a roomy stack the soft MAX_PARSE_DEPTH guard fires
+ // ("Maximum parse depth exceeded"); on a constrained CI thread stack a real StackOverflowError is
+ // caught and rewrapped ("Depth too deep. Stack overflow occurred.") below the soft limit. Accept either.
+ var input = sb.toString();
+ var e = assertThrows(ParseException.class, () -> parse(input, Object.class));
+ var msg = String.valueOf(e.getMessage());
+ assertTrue(
+ msg.contains("Maximum parse depth exceeded") || msg.contains("Depth too deep"),
+ "Expected a graceful depth-failure ParseException. Actual:\n" + msg);
}
@Test void f02_moderateNestingStillParses() throws Exception {