]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix: prevent shutdown timeout with promiseWithTimeout helper
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 24 Mar 2026 18:08:34 +0000 (19:08 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 24 Mar 2026 18:08:34 +0000 (19:08 +0100)
commit32384c4cce3aa958c5d2e4f771e4ef15812f55d1
treea4e9faf600e171d01da51f95767618a8242028fc
parentedb49d957cab02b9b72f395c670037f5199937c2
fix: prevent shutdown timeout with promiseWithTimeout helper

Extract a shared promiseWithTimeout<T>() utility from 3 divergent
Promise.race+timeout implementations. Use it in ChargingStation.stop()
to cap stopMessageSequence at 30s so the stopped event is always
emitted even when the OCPP server is unreachable, preventing the
60s Bootstrap shutdown timeout.

Also fix mock server SecurityEventNotification handler parameter name
and add OCPP 2.0.1 E2E test plan.
src/charging-station/ChargingStation.ts
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/charging-station/ocpp/auth/strategies/RemoteAuthStrategy.ts
src/utils/Constants.ts
src/utils/Utils.ts
src/utils/index.ts
tests/ocpp-server/server.py
tests/ocpp2-e2e-test-plan.md [new file with mode: 0644]