Skip to content

Commit 74a125c

Browse files
committed
CpsScriptTest.methodTooLargeExceptionRealistic(): update comments and expected matching line
Signed-off-by: Jim Klimov <[email protected]>
1 parent 66afa75 commit 74a125c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugin/src/test/java/org/jenkinsci/plugins/workflow/cps/CpsScriptTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ public void evaluateShallSandbox() throws Exception {
115115
// * java.lang.StackOverflowError varies per JDK platform
116116
// (CI on Linux was unhappy with 255, on Windows with 1023)
117117
// * Up to 255 stages allowed
118+
// FIXME? Tune the value per platform and/or dynamically
119+
// based on stack overflow mention in build log?
118120
int i, max = 200;
119121

120122
for (i = 0; i < max; i++) {
@@ -160,10 +162,13 @@ public void evaluateShallSandbox() throws Exception {
160162

161163
// DEV-TEST // System.out.println(b.getLog());
162164

165+
// Do we have the expected error at all?
166+
// (Maybe also stack overflow on some platforms,
167+
// possibly success on others)
163168
r.assertLogContains("MethodTooLargeException", b);
164169

165170
// "Prettier" explanation added by CpsFlowExecution.parseScript():
166-
r.assertLogContains("FAILED to parse WorkflowScript (the pipeline script) due to MethodTooLargeException:", b);
171+
r.assertLogContains("FAILED to parse WorkflowScript (the pipeline script) due to MethodTooLargeException", b);
167172

168173
/*
169174
// Report as of release 3880.vb_ef4b_5cfd270 (Feb 2024)

0 commit comments

Comments
 (0)