From 82880b8be4b997913ca87f91fb88c0676a3e0f43 Mon Sep 17 00:00:00 2001 From: Dmitry Konstantinov Date: Wed, 13 Aug 2025 12:53:29 +0100 Subject: [PATCH] Add CauseOfInterruption printing if a test split execution is aborted Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20833 --- .jenkins/Jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 7cee6634a3..0b540a5b5c 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -395,6 +395,13 @@ def test(command, cell) { archiveArtifacts artifacts: "${logfile}", fingerprint: true } if (0 != status) { error("Stage ${cell.step}${cell_suffix} failed with exit status ${status}") } + } catch (exc) { + if (exc.getClass().getName() == "org.jenkinsci.plugins.workflow.steps.FlowInterruptedException") { + for (def causeOfInterruption in exc.getCauses()) { + echo "CauseOfInterruption: ${causeOfInterruption.getClass().getName()} - ${causeOfInterruption.getShortDescription()}" + } + } + throw exc } finally { def duration = System.currentTimeMillis() - timer def formattedTime = String.format("%tT.%tL", duration, duration)