Skip to content

Commit 0bfeed0

Browse files
jbachorikclaude
andcommitted
chaos: fail fast on missing RUNTIME argument
Without a RUNTIME arg, chaos_check.sh silently proceeds with an empty value, which becomes --duration s in the chaos harness invocation and fails 15+ seconds later — after the JDK/agent/jar setup — with a NumberFormatException buried in the harness output, reported generically as "FAIL:Chaos harness crashed (RC=1)". Check for a missing RUNTIME right after arg parsing and fail immediately with a clear usage message. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 17c3771 commit 0bfeed0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.gitlab/reliability/chaos_check.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ RUNTIME=${1}
99
CONFIG=${2:-profiler+tracer}
1010
ALLOCATOR=${3:-gmalloc}
1111

12+
if [ -z "${RUNTIME}" ]; then
13+
echo "FAIL:missing RUNTIME argument (usage: $0 <runtime-seconds> [config] [allocator])" >&2
14+
exit 1
15+
fi
16+
1217
echo "Chaos run: runtime=${RUNTIME}s config=${CONFIG} allocator=${ALLOCATOR}"
1318

1419
CHAOS_JDK="${CHAOS_JDK:-21.0.3-tem}"

0 commit comments

Comments
 (0)