refactor: rename constant to a more sensible name
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 19 Nov 2023 11:52:20 +0000 (12:52 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 19 Nov 2023 11:52:20 +0000 (12:52 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/Bootstrap.ts
src/utils/Constants.ts

index 88c516bddeb527be0c11cf03ac8902c3e16fda87..05bd7053033250988e3b9dc66dab275a16ac5f34 100644 (file)
@@ -215,11 +215,11 @@ export class Bootstrap extends EventEmitter {
     return new Promise<string>((resolve, reject) => {
       const waitTimeout = setTimeout(() => {
         const message = `Timeout ${formatDurationMilliSeconds(
-          Constants.STOP_SIMULATOR_TIMEOUT,
+          Constants.STOP_CHARGING_STATIONS_TIMEOUT,
         )} reached at stopping charging stations`;
         console.warn(chalk.yellow(message));
         reject(new Error(message));
-      }, Constants.STOP_SIMULATOR_TIMEOUT);
+      }, Constants.STOP_CHARGING_STATIONS_TIMEOUT);
       waitChargingStationEvents(
         this,
         ChargingStationWorkerMessageEvents.stopped,
index 2a184016371efa766b3d633051a1a17c9ff951d2..966fd83af261c12ecc44c4e907203bf7829f837b 100644 (file)
@@ -49,7 +49,7 @@ export class Constants {
 
   static readonly MAX_RANDOM_INTEGER = 281474976710654;
 
-  static readonly STOP_SIMULATOR_TIMEOUT = 120000; // Ms
+  static readonly STOP_CHARGING_STATIONS_TIMEOUT = 120000; // Ms
 
   static readonly EMPTY_FROZEN_OBJECT = Object.freeze({});
   static readonly EMPTY_FUNCTION = Object.freeze(() => {