Skip to content

Commit 5b84f16

Browse files
committed
fix: remove incorrectly added test code during commit port
1 parent 39bd363 commit 5b84f16

File tree

3 files changed

+6
-41
lines changed

3 files changed

+6
-41
lines changed

tests/pools/abstract-pool.test.mjs

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -741,47 +741,20 @@ describe({
741741
pool.setTasksQueueOptions({
742742
concurrency: 2,
743743
size: 2,
744-
taskStealing: false,
745-
tasksStealingOnBackPressure: false,
746-
tasksStealingRatio: 0.5,
747-
tasksFinishedTimeout: 3000,
748-
agingFactor: 0.002,
749-
loadExponent: 0.5,
750-
})
751-
expect(pool.opts.tasksQueueOptions).toStrictEqual({
752-
agingFactor: 0.002,
753-
concurrency: 2,
754-
loadExponent: 0.5,
755-
size: 2,
756744
tasksFinishedTimeout: 3000,
757745
tasksStealingOnBackPressure: false,
758746
tasksStealingRatio: 0.5,
759747
taskStealing: false,
760748
})
761-
for (const workerNode of pool.workerNodes) {
762-
expect(workerNode.tasksQueueBackPressureSize).toBe(
763-
pool.opts.tasksQueueOptions.size,
764-
)
765-
}
766-
pool.setTasksQueueOptions({
767-
concurrency: 2,
768-
size: 2,
769-
taskStealing: false,
770-
tasksStealingOnBackPressure: false,
771-
tasksStealingRatio: 0.5,
772-
tasksFinishedTimeout: 3000,
773-
agingFactor: 0.002,
774-
loadExponent: 0.5,
775-
})
776749
expect(pool.opts.tasksQueueOptions).toStrictEqual({
750+
agingFactor: 0.001,
777751
concurrency: 2,
752+
loadExponent: 0.6666666666666666,
778753
size: 2,
779-
taskStealing: false,
754+
tasksFinishedTimeout: 3000,
780755
tasksStealingOnBackPressure: false,
781756
tasksStealingRatio: 0.5,
782-
tasksFinishedTimeout: 3000,
783-
agingFactor: 0.002,
784-
loadExponent: 0.5,
757+
taskStealing: false,
785758
})
786759
for (const workerNode of pool.workerNodes) {
787760
expect(workerNode.tasksQueueBackPressureSize).toBe(
@@ -794,9 +767,9 @@ describe({
794767
tasksStealingOnBackPressure: true,
795768
})
796769
expect(pool.opts.tasksQueueOptions).toStrictEqual({
797-
agingFactor: 0.002,
770+
agingFactor: 0.001,
798771
concurrency: 1,
799-
loadExponent: 0.5,
772+
loadExponent: 0.6666666666666666,
800773
size: 2,
801774
tasksFinishedTimeout: 3000,
802775
tasksStealingOnBackPressure: true,

tests/queues/fixed-priority-queue.test.mjs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ import {
99
} from '../../src/queues/queue-types.ts'
1010

1111
describe('Fixed priority queue test suite', () => {
12-
it('Verify defaultAgingFactor and defaultLoadExponent values', () => {
13-
expect(defaultAgingFactor).toBe(0.001)
14-
expect(defaultLoadExponent).toBe(1.0 / 1.5)
15-
})
16-
1712
it('Verify constructor() behavior', () => {
1813
expect(() => new FixedPriorityQueue('')).toThrow(
1914
new TypeError("Invalid fixed queue size: '' is not an integer"),

tests/queues/priority-queue.test.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ describe('Priority queue test suite', () => {
4545
expect(priorityQueue.head.capacity).toBe(bucketSize)
4646
expect(priorityQueue.tail).toBeInstanceOf(FixedPriorityQueue)
4747
expect(priorityQueue.tail).toStrictEqual(priorityQueue.head)
48-
priorityQueue = new PriorityQueue(bucketSize, true, 0.002, 0.5)
49-
expect(priorityQueue.agingFactor).toBe(0.002)
50-
expect(priorityQueue.loadExponent).toBe(0.5)
5148
})
5249

5350
it('Verify default bucket size enqueue() behavior', () => {

0 commit comments

Comments
 (0)