test: fix tests
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 5 Jun 2023 13:54:47 +0000 (15:54 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 5 Jun 2023 13:54:47 +0000 (15:54 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
tests/pools/abstract/abstract-pool.test.js
tests/pools/selection-strategies/selection-strategies.test.js

index 03a4ab7e7061ee20c30bc4f0af1d1beb67954fe7..b88e489b7f05065b6ad780f454789b853cb8e85f 100644 (file)
@@ -201,7 +201,8 @@ describe('Abstract pool test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     pool.setWorkerChoiceStrategyOptions({ medRunTime: true })
     expect(pool.opts.workerChoiceStrategyOptions).toStrictEqual({
@@ -219,7 +220,8 @@ describe('Abstract pool test suite', () => {
       medRunTime: true,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     pool.setWorkerChoiceStrategyOptions({ medRunTime: false })
     expect(pool.opts.workerChoiceStrategyOptions).toStrictEqual({
@@ -237,7 +239,8 @@ describe('Abstract pool test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     await pool.destroy()
   })
@@ -346,7 +349,8 @@ describe('Abstract pool test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
     }
     await pool.destroy()
@@ -387,7 +391,8 @@ describe('Abstract pool test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
     }
     await Promise.all(promises)
@@ -403,7 +408,8 @@ describe('Abstract pool test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
     }
     await pool.destroy()
@@ -433,7 +439,8 @@ describe('Abstract pool test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
       expect(workerNode.tasksUsage.ran).toBeGreaterThan(0)
       expect(workerNode.tasksUsage.ran).toBeLessThanOrEqual(maxMultiplier)
@@ -451,7 +458,8 @@ describe('Abstract pool test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
       expect(workerNode.tasksUsage.runTimeHistory.length).toBe(0)
       expect(workerNode.tasksUsage.waitTimeHistory.length).toBe(0)
index da261e89f930b94e52b872cff3c1c2b4796d8f26..e9f5983e9dac1ad5cfbf75d84fa0a7ef715de379 100644 (file)
@@ -129,7 +129,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     await pool.destroy()
     pool = new DynamicThreadPool(
@@ -146,7 +147,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     // We need to clean up the resources after our test
     await pool.destroy()
@@ -177,7 +179,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
     }
     expect(
@@ -215,7 +218,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
     }
     expect(
@@ -308,7 +312,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     await pool.destroy()
     pool = new DynamicThreadPool(
@@ -325,7 +330,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     // We need to clean up the resources after our test
     await pool.destroy()
@@ -356,7 +362,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
     }
     // We need to clean up the resources after our test
@@ -389,7 +396,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
     }
     // We need to clean up the resources after our test
@@ -411,7 +419,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     await pool.destroy()
     pool = new DynamicThreadPool(
@@ -428,7 +437,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     // We need to clean up the resources after our test
     await pool.destroy()
@@ -459,7 +469,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
       expect(workerNode.tasksUsage.ran).toBeGreaterThan(0)
       expect(workerNode.tasksUsage.ran).toBeLessThanOrEqual(max * maxMultiplier)
@@ -495,7 +506,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
       expect(workerNode.tasksUsage.ran).toBeGreaterThan(0)
       expect(workerNode.tasksUsage.ran).toBeLessThanOrEqual(max * maxMultiplier)
@@ -520,7 +532,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     await pool.destroy()
     pool = new DynamicThreadPool(
@@ -537,7 +550,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     // We need to clean up the resources after our test
     await pool.destroy()
@@ -568,7 +582,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
       expect(workerNode.tasksUsage.runTime).toBeGreaterThan(0)
       expect(workerNode.tasksUsage.avgRunTime).toBeGreaterThan(0)
@@ -608,7 +623,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
       expect(workerNode.tasksUsage.runTime).toBeGreaterThan(0)
       expect(workerNode.tasksUsage.avgRunTime).toBeGreaterThan(0)
@@ -653,7 +669,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
       expect(workerNode.tasksUsage.runTime).toBeGreaterThan(0)
       expect(workerNode.tasksUsage.medRunTime).toBeGreaterThan(0)
@@ -756,7 +773,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     await pool.destroy()
     pool = new DynamicThreadPool(
@@ -773,7 +791,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     // We need to clean up the resources after our test
     await pool.destroy()
@@ -804,7 +823,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
       expect(workerNode.tasksUsage.ran).toBeGreaterThanOrEqual(0)
       expect(workerNode.tasksUsage.ran).toBeLessThanOrEqual(max * maxMultiplier)
@@ -851,7 +871,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
       expect(workerNode.tasksUsage.ran).toBeGreaterThan(0)
       expect(workerNode.tasksUsage.ran).toBeLessThanOrEqual(max * maxMultiplier)
@@ -903,7 +924,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
       expect(workerNode.tasksUsage.ran).toBeGreaterThan(0)
       expect(workerNode.tasksUsage.ran).toBeLessThanOrEqual(max * maxMultiplier)
@@ -1018,7 +1040,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     await pool.destroy()
     pool = new DynamicThreadPool(
@@ -1035,7 +1058,8 @@ describe('Selection strategies test suite', () => {
       medRunTime: false,
       waitTime: false,
       avgWaitTime: false,
-      medWaitTime: false
+      medWaitTime: false,
+      elu: false
     })
     // We need to clean up the resources after our test
     await pool.destroy()
@@ -1069,7 +1093,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
     }
     expect(
@@ -1129,7 +1154,8 @@ describe('Selection strategies test suite', () => {
         waitTimeHistory: expect.any(CircularArray),
         avgWaitTime: 0,
         medWaitTime: 0,
-        error: 0
+        error: 0,
+        elu: undefined
       })
     }
     expect(