]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
style: apply prettier formatting to test files
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Mar 2026 14:45:15 +0000 (15:45 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Mar 2026 14:45:15 +0000 (15:45 +0100)
Reformatting applied by lint-staged hooks during previous commits.
No behavioral changes.

47 files changed:
src/charging-station/ChargingStation.ts
src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts
src/utils/Constants.ts
tests/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-TriggerMessage.test.ts
tests/charging-station/ocpp/1.6/OCPP16Integration-Transactions.test.ts
tests/charging-station/ocpp/1.6/OCPP16RequestService-CallChain.test.ts
tests/charging-station/ocpp/1.6/OCPP16ResponseService-SimpleHandlers.test.ts
tests/charging-station/ocpp/1.6/OCPP16TestUtils.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CertificateSigned.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ChangeAvailability.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CustomerInformation.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DataTransfer.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DeleteCertificate.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetBaseReport.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetInstalledCertificateIds.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetLog.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetTransactionStatus.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetVariables.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-InstallCertificate.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-MasterPass.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStartTransaction.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetNetworkProfile.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetVariables.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-TriggerMessage.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UnlockConnector.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UpdateFirmware.test.ts
tests/charging-station/ocpp/2.0/OCPP20Integration-Certificate.test.ts
tests/charging-station/ocpp/2.0/OCPP20Integration.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-CallChain.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-DataTransfer.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-FirmwareStatusNotification.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-ISO15118.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-LogStatusNotification.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-MeterValues.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-NotifyReport.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-SecurityEventNotification.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-SignCertificate.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-BootNotification.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-SimpleHandlers.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-TransactionEvent.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts
tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts
tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts
tests/charging-station/ocpp/OCPPServiceUtils-meterValues.test.ts

index 47e644fb0fe3deaf72ccac4a1a2eaebe985ed50d..b1223cdd3688ab5f71692fba18f97cf751bc77a9 100644 (file)
@@ -766,7 +766,7 @@ export class ChargingStation extends EventEmitter {
   public getWebSocketPingInterval (): number {
     return getConfigurationKey(this, StandardParametersKey.WebSocketPingInterval) != null
       ? convertToInt(getConfigurationKey(this, StandardParametersKey.WebSocketPingInterval)?.value)
-      : Constants.DEFAULT_WEBSOCKET_PING_INTERVAL
+      : Constants.DEFAULT_WS_PING_INTERVAL
   }
 
   public hasConnector (connectorId: number): boolean {
index 617e235fc3c550f44e02e3cdf770810448e9617a..2d80aee456af4b1fd8ffafba6b6d49931b78ca82 100644 (file)
@@ -592,7 +592,7 @@ export const VARIABLE_REGISTRY: Record<string, VariableMetadata> = {
     allowZero: true,
     component: OCPP20ComponentName.ChargingStation,
     dataType: DataEnumType.integer,
-    defaultValue: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL.toString(),
+    defaultValue: Constants.DEFAULT_WS_PING_INTERVAL.toString(),
     description:
       'Interval in seconds between WebSocket ping (keep-alive) frames. 0 disables pings.',
     max: 3600,
@@ -1458,7 +1458,7 @@ export const VARIABLE_REGISTRY: Record<string, VariableMetadata> = {
     allowZero: true,
     component: OCPP20ComponentName.OCPPCommCtrlr,
     dataType: DataEnumType.integer,
-    defaultValue: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL.toString(),
+    defaultValue: Constants.DEFAULT_WS_PING_INTERVAL.toString(),
     description:
       '0 disables client side websocket Ping/Pong. Positive values are interpreted as number of seconds between pings. Negative values are not allowed.',
     min: 0,
index 18f745faf9b154863481da1f6e6bf3e21dbc8dca..b932109e9c54d4a684e464704517dff2f909a8b3 100644 (file)
@@ -85,11 +85,10 @@ export class Constants {
   static readonly DEFAULT_TX_UPDATED_INTERVAL = 30 // Seconds
 
   static readonly DEFAULT_UI_SERVER_HOST = 'localhost'
-
   static readonly DEFAULT_UI_SERVER_PORT = 8080
-  static readonly DEFAULT_WEBSOCKET_PING_INTERVAL = 30 // Seconds
 
   static readonly DEFAULT_WS_HANDSHAKE_TIMEOUT = 30 // Seconds
+  static readonly DEFAULT_WS_PING_INTERVAL = 30 // Seconds
   static readonly DEFAULT_WS_RECONNECT_DELAY = 30 // Seconds
 
   static readonly EMPTY_FROZEN_OBJECT = Object.freeze({})
index 9a6303e8e677b3e0c55f246871db2c988f92e6a3..b92fcc840139faae84feead92246d2cdb0297885 100644 (file)
@@ -183,7 +183,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -202,7 +202,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -223,7 +223,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -242,7 +242,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -263,7 +263,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -282,7 +282,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -303,7 +303,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -322,7 +322,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -341,7 +341,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -360,7 +360,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -379,7 +379,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -398,7 +398,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -417,7 +417,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -436,7 +436,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -457,7 +457,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -477,7 +477,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -497,7 +497,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
@@ -516,7 +516,7 @@ await describe('ChargingStationWorkerBroadcastChannel', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       instance = new ChargingStationWorkerBroadcastChannel(station)
index fa4d612c6d9db5d1f43920f2a4ebb73f2d9c72bd..d2ec110c74a83ab8554d0556475dcfcaefd158c0 100644 (file)
@@ -283,7 +283,7 @@ await describe('OCPP16IncomingRequestService — TriggerMessage', async () => {
         stationInfo: {
           ocppVersion: OCPPVersion.VERSION_16,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       const request: OCPP16TriggerMessageRequest = {
index bac5fe3e91001057798b2ddcae4a8af163701a50..b6f70485f1dd9eb9d21e539b74484b19584d1104 100644 (file)
@@ -64,7 +64,7 @@ function createIntegrationContext (): {
       ocppStrictCompliance: false,
       ocppVersion: OCPPVersion.VERSION_16,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
 
   // IncomingRequest service (handles RemoteStart/Stop from CSMS)
index 27e26bab0ecfca3b6878d66c086c44e126601ce2..f89a49e1a41396b12d6633d602fb38a61d373da7 100644 (file)
@@ -52,7 +52,7 @@ await describe('OCPP 1.6 Request Call Chain — requestHandler → buildRequestP
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_16,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
   })
index feadd991cbbb6fedb8850567f9f77b2799187cab..487ef5831de7e3ef0e3fa397787cf56ca572af0e 100644 (file)
@@ -43,7 +43,7 @@ function createSimpleHandlerStation (): MockChargingStation {
       ocppStrictCompliance: false,
       ocppVersion: OCPPVersion.VERSION_16,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
   return station as MockChargingStation
 }
index 825e16e7c9a33be90c6026e5651585b198c9835c..4bee624af3dd0b1906db060b36f3ffcefb93d8e2 100644 (file)
@@ -145,7 +145,7 @@ export function createOCPP16IncomingRequestTestContext (
       ocppVersion: OCPPVersion.VERSION_16,
       ...stationInfo,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
 
   return { incomingRequestService, station, testableService }
@@ -172,7 +172,7 @@ export function createOCPP16ListenerStation (baseName: string): {
       ocppStrictCompliance: false,
       ocppVersion: OCPPVersion.VERSION_16,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
   return { requestHandlerMock, station }
 }
@@ -200,7 +200,7 @@ export function createOCPP16RequestTestContext (
       ocppVersion: OCPPVersion.VERSION_16,
       ...stationInfo,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
 
   return { requestService, station, testableRequestService }
@@ -231,7 +231,7 @@ export function createOCPP16ResponseTestContext (
       ocppVersion: OCPPVersion.VERSION_16,
       ...stationInfo,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
 
   return { responseService, station }
@@ -262,7 +262,7 @@ export function createStandardStation (
       resetTime: 5000,
       ...stationInfo,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
 
   return station as MockChargingStation
index dd29f8cd5ca4bf09f2272c2e05a9f7fe32a25781..db07aab659dd275996a0a4e758370134d02d086e 100644 (file)
@@ -53,7 +53,7 @@ await describe('I04 - CertificateSigned', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
     stationWithCertManager = createStationWithCertificateManager(
@@ -185,7 +185,7 @@ await describe('I04 - CertificateSigned', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       // certificateManager is not set on this station (not present by default)
index 2f56cd737970fadcbd9a12b2d7507236bd505253..b64ceabb81bc840d7494e772a6022ea4167907ad 100644 (file)
@@ -41,7 +41,7 @@ await describe('G03 - ChangeAvailability', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
     const incomingRequestService = new OCPP20IncomingRequestService()
index 0d5247d4983db96c4dbc8cb03334e05ac7b2a7a8..8883b7c2170527e899416796d8d38c00bb1d0918 100644 (file)
@@ -36,7 +36,7 @@ await describe('C11 - Clear Authorization Data in Authorization Cache', async ()
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
     incomingRequestService = new OCPP20IncomingRequestService()
index bf6d8c1a3d3d0fc7b69a004804ab540aa35b247c..a6063f8f526e35302faec898010be363d79dc6d4 100644 (file)
@@ -38,7 +38,7 @@ await describe('N32 - CustomerInformation', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
     testableService = createTestableIncomingRequestService(new OCPP20IncomingRequestService())
index 24a8fdba8189204a763e2719e6ecc35249f6fd65..dc801aeb1f96eb181a7d057b314629044df932ce 100644 (file)
@@ -30,7 +30,7 @@ await describe('P01 - DataTransfer', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
     testableService = createTestableIncomingRequestService(new OCPP20IncomingRequestService())
index 1e37b3303164af6d0d6a801dd9c442f467e825a3..54be61744e583c17cd59e365ef324ad68f82ed20 100644 (file)
@@ -61,7 +61,7 @@ await describe('I04 - DeleteCertificate', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
 
@@ -182,7 +182,7 @@ await describe('I04 - DeleteCertificate', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       const stationNoCertManager =
index 17d3f37c3d9e6cf26ea6229c421d11a4d933f661..b04adb71f5d27014b61ca0fd9fcf42b503d3a600 100644 (file)
@@ -77,7 +77,7 @@ await describe('B07 - Get Base Report', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
 
index 0f428738cd0a0214a7391b51e011cb012ca0d3f1..51e38d7f41317037225acb461cf691f251cb4644 100644 (file)
@@ -45,7 +45,7 @@ await describe('I04 - GetInstalledCertificateIds', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
 
@@ -244,7 +244,7 @@ await describe('I04 - GetInstalledCertificateIds', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       // Explicitly set to null/undefined
index 12c16ed33dbfca914557bc2b65ff3b8279726238..b6ba97157a0f68a5734b5d4c9944717e17511469 100644 (file)
@@ -44,7 +44,7 @@ await describe('K01 - GetLog', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
     testableService = createTestableIncomingRequestService(new OCPP20IncomingRequestService())
index f2962d20a94c4c9f0f7445197936be4917b09a27..7f9ed90412e917d06779afe0d0949596c952c9ba 100644 (file)
@@ -33,7 +33,7 @@ await describe('D14 - GetTransactionStatus', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
     testableService = createTestableIncomingRequestService(new OCPP20IncomingRequestService())
index b88adec8a3350de81fbfdbafc5c4cbee6ba2769d..6743d2accc8f7260e81fc6a1141e7450e8eb059b 100644 (file)
@@ -50,7 +50,7 @@ await describe('B06 - Get Variables', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = newStation
     incomingRequestService = new OCPP20IncomingRequestService()
@@ -101,10 +101,7 @@ await describe('B06 - Get Variables', async () => {
     const secondResult = response.getVariableResult[1]
     assert.strictEqual(secondResult.attributeStatus, GetVariableStatusEnumType.Accepted)
     assert.strictEqual(secondResult.attributeType, AttributeEnumType.Actual)
-    assert.strictEqual(
-      secondResult.attributeValue,
-      Constants.DEFAULT_WEBSOCKET_PING_INTERVAL.toString()
-    )
+    assert.strictEqual(secondResult.attributeValue, Constants.DEFAULT_WS_PING_INTERVAL.toString())
     assert.strictEqual(secondResult.component.name, OCPP20ComponentName.ChargingStation)
     assert.strictEqual(secondResult.variable.name, OCPP20OptionalVariableName.WebSocketPingInterval)
     assert.strictEqual(secondResult.attributeStatusInfo, undefined)
index 35f8f5c804584ee6961ac64d07b0165e6bd5c4d9..a995279bb04e473b4082fe56238fe5bd72f67db4 100644 (file)
@@ -52,7 +52,7 @@ await describe('I03 - InstallCertificate', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     mockStation = initialStation
 
index 7609153578644fbab35dbda808b56cb58c072df6..be9c1d9b5983cbcaf29acb950817d0a1ee0b2aa4 100644 (file)
@@ -49,7 +49,7 @@ await describe('C12.FR.09 - MasterPassGroupId Check', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     mockStation = station
     const incomingRequestService = new OCPP20IncomingRequestService()
index 60eb3de08c482079ae9a1db9f25d4c13f5579e45..51f022224519e2edf17cc08bfaf436a86a0db39f 100644 (file)
@@ -59,7 +59,7 @@ await describe('F01 & F02 - Remote Start Transaction', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     mockStation = station
     incomingRequestService = new OCPP20IncomingRequestService()
@@ -109,7 +109,7 @@ await describe('F01 & F02 - Remote Start Transaction', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
 
     const stationId = spyChargingStation.stationInfo?.chargingStationId ?? 'unknown'
@@ -543,7 +543,7 @@ await describe('F01 & F02 - Remote Start Transaction', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       const failStationId = failStation.stationInfo?.chargingStationId ?? 'unknown'
index eb015fa1f31522255838cc414a7911aa1cbb2786..507ab40814349aae38f459d2765308a4f113866a 100644 (file)
@@ -317,7 +317,7 @@ await describe('F03 - Remote Stop Transaction', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       const failStationId = failStation.stationInfo?.chargingStationId ?? 'unknown'
index 42e034908caa663e9bd340e654e4e001c83a9a19..7191b61f642df9cc78c2eec0057045c38c9081bc 100644 (file)
@@ -38,7 +38,7 @@ await describe('B43 - SetNetworkProfile', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
     testableService = createTestableIncomingRequestService(new OCPP20IncomingRequestService())
index 1110e073fdc49961c565a053ab6c7db3a1d4b6ed..3794aff6f93b2b213569c4b3edf95c3af89b6294 100644 (file)
@@ -56,7 +56,7 @@ await describe('B05 - Set Variables', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     mockStation = station
     incomingRequestService = new OCPP20IncomingRequestService()
@@ -75,7 +75,7 @@ await describe('B05 - Set Variables', async () => {
       setVariableData: [
         {
           attributeType: AttributeEnumType.Actual,
-          attributeValue: (Constants.DEFAULT_WEBSOCKET_PING_INTERVAL + 1).toString(),
+          attributeValue: (Constants.DEFAULT_WS_PING_INTERVAL + 1).toString(),
           component: { name: OCPP20ComponentName.ChargingStation },
           variable: { name: OCPP20OptionalVariableName.WebSocketPingInterval },
         },
@@ -214,7 +214,7 @@ await describe('B05 - Set Variables', async () => {
       setVariableData: [
         // Accepted
         {
-          attributeValue: (Constants.DEFAULT_WEBSOCKET_PING_INTERVAL + 3).toString(),
+          attributeValue: (Constants.DEFAULT_WS_PING_INTERVAL + 3).toString(),
           component: { name: OCPP20ComponentName.ChargingStation },
           variable: { name: OCPP20OptionalVariableName.WebSocketPingInterval },
         },
@@ -234,7 +234,7 @@ await describe('B05 - Set Variables', async () => {
         // Unsupported attribute type (WebSocketPingInterval)
         {
           attributeType: AttributeEnumType.Target,
-          attributeValue: (Constants.DEFAULT_WEBSOCKET_PING_INTERVAL + 10).toString(),
+          attributeValue: (Constants.DEFAULT_WS_PING_INTERVAL + 10).toString(),
           component: { name: OCPP20ComponentName.ChargingStation },
           variable: { name: OCPP20OptionalVariableName.WebSocketPingInterval },
         },
@@ -274,7 +274,7 @@ await describe('B05 - Set Variables', async () => {
       setVariableData: [
         {
           attributeType: AttributeEnumType.Target,
-          attributeValue: (Constants.DEFAULT_WEBSOCKET_PING_INTERVAL + 6).toString(),
+          attributeValue: (Constants.DEFAULT_WS_PING_INTERVAL + 6).toString(),
           component: { name: OCPP20ComponentName.ChargingStation },
           variable: { name: OCPP20OptionalVariableName.WebSocketPingInterval },
         },
@@ -311,7 +311,7 @@ await describe('B05 - Set Variables', async () => {
   // FR: B07.FR.10
   await it('should persist HeartbeatInterval and WebSocketPingInterval after setting', () => {
     const hbNew = (millisecondsToSeconds(Constants.DEFAULT_HEARTBEAT_INTERVAL) + 20).toString()
-    const wsNew = (Constants.DEFAULT_WEBSOCKET_PING_INTERVAL + 20).toString()
+    const wsNew = (Constants.DEFAULT_WS_PING_INTERVAL + 20).toString()
     const setRequest: OCPP20SetVariablesRequest = {
       setVariableData: [
         {
@@ -400,7 +400,7 @@ await describe('B05 - Set Variables', async () => {
     const request: OCPP20SetVariablesRequest = {
       setVariableData: [
         {
-          attributeValue: (Constants.DEFAULT_WEBSOCKET_PING_INTERVAL + 2).toString(),
+          attributeValue: (Constants.DEFAULT_WS_PING_INTERVAL + 2).toString(),
           component: { name: OCPP20ComponentName.ChargingStation },
           variable: { name: OCPP20OptionalVariableName.WebSocketPingInterval },
         },
index 519fbe052928a271c7dd083a648b2b831e0825af..a0730e3a7087e05ad7c556149189e17b571575b0 100644 (file)
@@ -51,7 +51,7 @@ function createTriggerMessageStation (): {
     stationInfo: {
       ocppVersion: OCPPVersion.VERSION_201,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
   const mockStation = station as MockChargingStation
   return { mockStation, requestHandlerMock }
@@ -571,7 +571,7 @@ await describe('F06 - TriggerMessage', async () => {
         stationInfo: {
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       const request: OCPP20TriggerMessageRequest = {
index ea86a3348c3720990ff28370f9aaa6aaeb1bedf8..936f3cba107e746a122c64f14ee58f4ba2a93556 100644 (file)
@@ -47,7 +47,7 @@ function createUnlockConnectorStation (): {
     stationInfo: {
       ocppVersion: OCPPVersion.VERSION_201,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
   return { mockStation: station as MockChargingStation, requestHandlerMock }
 }
@@ -171,7 +171,7 @@ await describe('F05 - UnlockConnector', async () => {
         stationInfo: {
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       const multiConnectorStation = station as MockChargingStation
 
index 2f8d1357bac8948552bb8d0a515901090b967e6f..121a0f691846e62b8e5fc13a7d6b7dc6bc8ba455 100644 (file)
@@ -49,7 +49,7 @@ await describe('L01/L02 - UpdateFirmware', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
     testableService = createTestableIncomingRequestService(new OCPP20IncomingRequestService())
@@ -91,7 +91,7 @@ await describe('L01/L02 - UpdateFirmware', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       createStationWithCertificateManager(stationWithCert, certManager)
 
@@ -123,7 +123,7 @@ await describe('L01/L02 - UpdateFirmware', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       createStationWithCertificateManager(stationWithCert, certManager)
 
@@ -170,7 +170,7 @@ await describe('L01/L02 - UpdateFirmware', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       // Set an active transaction on EVSE 1's connector
@@ -208,7 +208,7 @@ await describe('L01/L02 - UpdateFirmware', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       const request: OCPP20UpdateFirmwareRequest = {
index 5d5ccbb6b527078e7c333fe095b2e64831360335..20734005ec7081fe669ef325f052f6443d276679 100644 (file)
@@ -42,7 +42,7 @@ function createIntegrationStation (): ChargingStation {
       ocppStrictCompliance: false,
       ocppVersion: OCPPVersion.VERSION_201,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
   return station
 }
index 652b9c229d240929b5efa0d160fe0f780bc481ab..470373ddc8d0087a1c455cd891d8f6350c6dde38 100644 (file)
@@ -44,7 +44,7 @@ function createIntegrationStation (): ChargingStation {
       ocppStrictCompliance: false,
       ocppVersion: OCPPVersion.VERSION_201,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
   return station
 }
index 5cdba8440d5b4838891edfc76f1c7ce3e3ff9170..4b9fa3a552ccbe3cfb165d62c130df060f355ec6 100644 (file)
@@ -48,7 +48,7 @@ await describe('OCPP 2.0 Request Call Chain — requestHandler → buildRequestP
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
   })
index be6c77c1424c2c770416865da95388cfd3583ac7..a20ea121127313b874d7b70ca925642386df2b77 100644 (file)
@@ -39,7 +39,7 @@ await describe('P02 - DataTransfer', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = newStation
 
index 098438cb4d12be7c4ecf1fdae09481471016adc7..4239018f6d56f393ca506afa927d07fdea74f4ed 100644 (file)
@@ -40,7 +40,7 @@ await describe('J01 - FirmwareStatusNotification', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = newStation
 
index 2262a3eeca0c45f99415320e6de0a326b39db81f..6945a31644928cfbc9a0f6c6078e785151b7f4c7 100644 (file)
@@ -46,7 +46,7 @@ await describe('OCPP20 ISO15118 Request Service', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       station = newStation
     })
@@ -213,7 +213,7 @@ await describe('OCPP20 ISO15118 Request Service', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       station = result.station
     })
@@ -339,7 +339,7 @@ await describe('OCPP20 ISO15118 Request Service', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       station = result.station
     })
index b0063a93001df0622eeebf4d3aa25a9d051be358..3c8a05345cb3aaba083f8e5ff046f8c32ab7b760 100644 (file)
@@ -40,7 +40,7 @@ await describe('M04 - LogStatusNotification', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = newStation
 
index 24e34af86f3a30195e526125d71a19818393b926..7b99540d2ace559a491f8ca26a0ec739b600c007 100644 (file)
@@ -39,7 +39,7 @@ await describe('G01 - MeterValues', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = newStation
 
index 22a2857fce096a2ec8c79092cabeca08c96de011..32b0d1b308438e9300babb7db639d04204931e7a 100644 (file)
@@ -54,7 +54,7 @@ await describe('B07/B08 - NotifyReport', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = createdStation
   })
index 75d78fd130996a02799435aa3f2e83adf46c4b3f..7988c3538b35f8f65cd059c2a53b1649f42e50d7 100644 (file)
@@ -38,7 +38,7 @@ await describe('A04 - SecurityEventNotification', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = newStation
 
index dc432bc93cb7bd811a6de684739252d02464b9f2..ff98765945f5a35aef6cd9bafd88bcd923f93a06 100644 (file)
@@ -39,7 +39,7 @@ await describe('I02 - SignCertificate Request', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = createdStation
     station.ocppConfiguration = {
@@ -350,7 +350,7 @@ await describe('I02 - SignCertificate Request', async () => {
           ocppStrictCompliance: false,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
 
       stationWithoutCertManager.ocppConfiguration = {
index 16ba3781052dea12f1c91ba0632550a49158b3fd..a49a71d869f274e99f5ff09187c96de531a0bf87 100644 (file)
@@ -49,7 +49,7 @@ function createBootNotificationStation (): MockChargingStation {
       ocppStrictCompliance: false,
       ocppVersion: OCPPVersion.VERSION_201,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
   return station as MockChargingStation
 }
index cbbc9ec9ba9f7f8267884c13e05c155b8e382e27..c2b80f60b5cd9d4d9deb7de0a2e6bf41e1117cb5 100644 (file)
@@ -35,7 +35,7 @@ function createSimpleHandlerStation (): MockChargingStation {
       ocppStrictCompliance: false,
       ocppVersion: OCPPVersion.VERSION_201,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
   return station as MockChargingStation
 }
index b578be1bcb984bf8eee77122882a6d86a0671268..541bf628d31cf21e19811d6c8b43316ce5b956c9 100644 (file)
@@ -88,7 +88,7 @@ await describe('D01 - TransactionEvent Response', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = mockStation
     // Set connector transactionId to the UUID string used in request payloads
@@ -287,7 +287,7 @@ await describe('D01 - TransactionEvent Response', async () => {
         ocppStrictCompliance: false,
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     setupConnectorWithTransaction(multiStation, 1, { transactionId: 10 })
     const connector1 = multiStation.getConnectorStatus(1)
index dd877c7e9e327915a15b2b227b53c70884eab9db..7a3500c5a4a7215a5a402d84bbfa3c8621815ea9 100644 (file)
@@ -103,7 +103,7 @@ await describe('OCPP20 TransactionEvent ServiceUtils', async () => {
           ocppStrictCompliance: true,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       mockStation = station
       resetLimits(mockStation)
@@ -339,7 +339,7 @@ await describe('OCPP20 TransactionEvent ServiceUtils', async () => {
             ocppStrictCompliance: true,
             ocppVersion: OCPPVersion.VERSION_201,
           },
-          websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+          websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
         })
 
         const connectorId = 1
@@ -513,7 +513,7 @@ await describe('OCPP20 TransactionEvent ServiceUtils', async () => {
             ocppStrictCompliance: true,
             ocppVersion: OCPPVersion.VERSION_201,
           },
-          websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+          websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
         })
 
         const connectorId = 1
@@ -592,7 +592,7 @@ await describe('OCPP20 TransactionEvent ServiceUtils', async () => {
           ocppStrictCompliance: true,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       mockStation = station
       resetLimits(mockStation)
@@ -1941,7 +1941,7 @@ await describe('OCPP20 TransactionEvent ServiceUtils', async () => {
             ocppStrictCompliance: true,
             ocppVersion: OCPPVersion.VERSION_201,
           },
-          websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+          websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
         })
 
         errorStation.isWebSocketConnectionOpened = () => false
@@ -2286,7 +2286,7 @@ await describe('OCPP20 TransactionEvent ServiceUtils', async () => {
             ocppStrictCompliance: true,
             ocppVersion: OCPPVersion.VERSION_201,
           },
-          websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+          websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
         })
 
         // Mock WebSocket as open
@@ -2718,7 +2718,7 @@ await describe('OCPP20 TransactionEvent ServiceUtils', async () => {
           ocppStrictCompliance: true,
           ocppVersion: OCPPVersion.VERSION_201,
         },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       station = s
       resetLimits(station)
index 6f3209e6cfcf08c7121e6035914f4a674c4d5792..a346c07dc2407252443dd521b69148346ddb6e8e 100644 (file)
@@ -143,7 +143,7 @@ export function createMockStationWithRequestTracking (): MockStationWithTracking
       ocppStrictCompliance: true,
       ocppVersion: OCPPVersion.VERSION_201,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
 
   station.isWebSocketConnectionOpened = () => isOnline
@@ -187,7 +187,7 @@ export function createOCPP20RequestTestContext (
       ocppVersion: OCPPVersion.VERSION_201,
       ...stationInfo,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
 
   return { requestService, station, testableRequestService }
@@ -508,7 +508,7 @@ export const ResetTestFixtures = {
         ocppVersion: OCPPVersion.VERSION_201,
         resetTime: 5000,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     const mockStation = station as MockChargingStation
     mockStation.getNumberOfRunningTransactions = () => runningTransactions
@@ -723,7 +723,7 @@ export function createOCPP20ListenerStation (baseName: string): {
       ocppStrictCompliance: false,
       ocppVersion: OCPPVersion.VERSION_201,
     },
-    websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+    websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
   })
   return { requestHandlerMock, station }
 }
index 6e5fd3b40658b2d44c2a76184b37d374d6b63e09..ef9690582afc80c75d6df7f4ef1c4231ba510697 100644 (file)
@@ -93,14 +93,14 @@ await describe('B05 - OCPP20VariableManager', async () => {
               StandardParametersKey.WebSocketPingInterval
             ),
             readonly: false,
-            value: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL.toString(),
+            value: Constants.DEFAULT_WS_PING_INTERVAL.toString(),
           },
         ],
       },
       stationInfo: {
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     station = newStation
   })
@@ -367,10 +367,7 @@ await describe('B05 - OCPP20VariableManager', async () => {
       // Second variable: WebSocketPingInterval
       assert.strictEqual(result[1].attributeStatus, GetVariableStatusEnumType.Accepted)
       assert.strictEqual(result[1].attributeType, AttributeEnumType.Actual)
-      assert.strictEqual(
-        result[1].attributeValue,
-        Constants.DEFAULT_WEBSOCKET_PING_INTERVAL.toString()
-      )
+      assert.strictEqual(result[1].attributeValue, Constants.DEFAULT_WS_PING_INTERVAL.toString())
       assert.strictEqual(result[1].component.name, OCPP20ComponentName.ChargingStation)
       assert.strictEqual(result[1].variable.name, OCPP20OptionalVariableName.WebSocketPingInterval)
       assert.strictEqual(result[1].attributeStatusInfo, undefined)
@@ -489,7 +486,7 @@ await describe('B05 - OCPP20VariableManager', async () => {
     await it('should accept setting writable variables (Actual default)', () => {
       const request: OCPP20SetVariableDataType[] = [
         {
-          attributeValue: (Constants.DEFAULT_WEBSOCKET_PING_INTERVAL + 1).toString(),
+          attributeValue: (Constants.DEFAULT_WS_PING_INTERVAL + 1).toString(),
           component: { name: OCPP20ComponentName.ChargingStation },
           variable: { name: OCPP20OptionalVariableName.WebSocketPingInterval },
         },
@@ -601,7 +598,7 @@ await describe('B05 - OCPP20VariableManager', async () => {
     await it('should handle multiple mixed SetVariables in one call', () => {
       const request: OCPP20SetVariableDataType[] = [
         {
-          attributeValue: (Constants.DEFAULT_WEBSOCKET_PING_INTERVAL + 2).toString(),
+          attributeValue: (Constants.DEFAULT_WS_PING_INTERVAL + 2).toString(),
           component: { name: OCPP20ComponentName.ChargingStation },
           variable: { name: OCPP20OptionalVariableName.WebSocketPingInterval },
         },
@@ -793,7 +790,7 @@ await describe('B05 - OCPP20VariableManager', async () => {
       const request: OCPP20SetVariableDataType[] = [
         {
           attributeType: AttributeEnumType.Target,
-          attributeValue: (Constants.DEFAULT_WEBSOCKET_PING_INTERVAL + 5).toString(),
+          attributeValue: (Constants.DEFAULT_WS_PING_INTERVAL + 5).toString(),
           component: { name: OCPP20ComponentName.ChargingStation },
           variable: { name: OCPP20OptionalVariableName.WebSocketPingInterval },
         },
@@ -891,7 +888,7 @@ await describe('B05 - OCPP20VariableManager', async () => {
       ])[0]
       const posRes = manager.setVariables(station, [
         {
-          attributeValue: (Constants.DEFAULT_WEBSOCKET_PING_INTERVAL + 10).toString(),
+          attributeValue: (Constants.DEFAULT_WS_PING_INTERVAL + 10).toString(),
           component: { name: OCPP20ComponentName.ChargingStation },
           variable: { name: OCPP20OptionalVariableName.WebSocketPingInterval },
         },
@@ -1730,7 +1727,7 @@ await describe('B05 - OCPP20VariableManager', async () => {
       stationInfo: {
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
 
     await it('should return NotSupportedAttributeType for MinSet HeartbeatInterval', () => {
@@ -2198,7 +2195,7 @@ await describe('B05 - OCPP20VariableManager', async () => {
         hashId: 'station-a-hash',
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
     const { station: stationB } = createMockChargingStation({
       baseName: 'StationB',
@@ -2209,7 +2206,7 @@ await describe('B05 - OCPP20VariableManager', async () => {
         hashId: 'station-b-hash',
         ocppVersion: OCPPVersion.VERSION_201,
       },
-      websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+      websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
     })
 
     try {
index 9418d7aabeb000f5fbad10475cae332ad946417d..09b04f7121f82fb482957d4b9214b7bfcbbaf644 100644 (file)
@@ -51,7 +51,7 @@ await describe('buildMeterValue', async () => {
         connectorsCount: 1,
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_16 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       station = s
       const connectorStatus = station.getConnectorStatus(1)
@@ -87,7 +87,7 @@ await describe('buildMeterValue', async () => {
         evseConfiguration: { evsesCount: 1 },
         heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
         stationInfo: { ocppVersion: OCPPVersion.VERSION_201 },
-        websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
+        websocketPingInterval: Constants.DEFAULT_WS_PING_INTERVAL,
       })
       station = s
       const connectorStatus = station.getConnectorStatus(1)