Skip to content

Commit 681248b

Browse files
m4r1kclaude
andcommitted
fix(e2e): low-battery scenario charge below UPS2's threshold
The Commit 5 bump of low-battery.dev runtime to 900s removed the critical-runtime fallback that was previously masking a real bug: UPS2 in tests/e2e/config-e2e-multi-ups.yaml has low_battery_threshold=15, and the LOW BATTERY trigger uses strict `<`, so battery.charge=15 never fires UPS2's shutdown. Test 15 (Non-local failure) sat for the full 15-minute job timeout waiting for a shutdown that wasn't going to come. Drop battery.charge to 14 so the scenario fires LOW BATTERY against both UPS1 (threshold 20) and UPS2 (threshold 15), and the single-UPS tests still exercise the same trigger. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent fdf5f62 commit 681248b

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

tests/e2e/scenarios/low-battery.dev

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Scenario: Low battery — should trigger shutdown via the LOW BATTERY
2-
# (charge < 20%) trigger, NOT via the critical-runtime trigger.
3-
# runtime is set ABOVE the 600 s critical-runtime threshold so the
4-
# shutdown is unambiguously attributable to the low-battery path; the
5-
# previous value of 180 s also crossed the critical-runtime threshold,
6-
# making test failures hard to localise.
2+
# (charge < threshold) trigger, NOT via the critical-runtime trigger.
3+
# runtime is ABOVE the 600 s critical-runtime threshold so the shutdown
4+
# is unambiguously attributable to the low-battery path; the previous
5+
# value of 180 s also crossed the critical-runtime threshold and made
6+
# failures hard to localise.
7+
# charge is 14 (not 15) so it fires both UPS1 (threshold 20, single-UPS
8+
# tests) AND UPS2 in tests/e2e/config-e2e-multi-ups.yaml (threshold 15).
9+
# The trigger uses strict `<`, so a value equal to the threshold doesn't
10+
# fire and Test 15 in multi-ups.sh would never trigger UPS2's shutdown.
711
ups.status: OB DISCHRG LB
812
ups.load: 35
913

10-
battery.charge: 15
14+
battery.charge: 14
1115
battery.runtime: 900
1216
battery.voltage: 44.0
1317

0 commit comments

Comments
 (0)