Skip to content

Commit b0976b3

Browse files
committed
remove repeat tests
1 parent 4f2eaf0 commit b0976b3

File tree

1 file changed

+29
-30
lines changed

1 file changed

+29
-30
lines changed

packages/core/src/test/shared/utilities/processUtils.test.ts

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -415,36 +415,35 @@ describe('ChildProcessTracker', function () {
415415
await clock.tickAsync(ChildProcessTracker.pollingInterval)
416416
assert.strictEqual(tracker.has(runningProcess.childProcess), false, 'process was not removed after stopping')
417417
})
418-
for (const _ of Array.from({ length: 1000 })) {
419-
it('multiple processes from same command are tracked seperately', async function () {
420-
const runningProcess1 = startSleepProcess()
421-
const runningProcess2 = startSleepProcess()
422-
tracker.add(runningProcess1.childProcess)
423-
tracker.add(runningProcess2.childProcess)
424-
425-
assert.strictEqual(tracker.has(runningProcess1.childProcess), true, 'Missing first process')
426-
assert.strictEqual(tracker.has(runningProcess2.childProcess), true, 'Missing second process')
427-
428-
await stopAndWait(runningProcess1)
429-
await clock.tickAsync(ChildProcessTracker.pollingInterval)
430-
assert.strictEqual(tracker.has(runningProcess2.childProcess), true, 'second process was mistakenly removed')
431-
assert.strictEqual(
432-
tracker.has(runningProcess1.childProcess),
433-
false,
434-
'first process was not removed after stopping it'
435-
)
436-
437-
await stopAndWait(runningProcess2)
438-
await clock.tickAsync(ChildProcessTracker.pollingInterval)
439-
assert.strictEqual(
440-
tracker.has(runningProcess2.childProcess),
441-
false,
442-
'second process was not removed after stopping it'
443-
)
444-
445-
assert.strictEqual(tracker.size(), 0, 'expected tracker to be empty')
446-
})
447-
}
418+
419+
it('multiple processes from same command are tracked seperately', async function () {
420+
const runningProcess1 = startSleepProcess()
421+
const runningProcess2 = startSleepProcess()
422+
tracker.add(runningProcess1.childProcess)
423+
tracker.add(runningProcess2.childProcess)
424+
425+
assert.strictEqual(tracker.has(runningProcess1.childProcess), true, 'Missing first process')
426+
assert.strictEqual(tracker.has(runningProcess2.childProcess), true, 'Missing second process')
427+
428+
await stopAndWait(runningProcess1)
429+
await clock.tickAsync(ChildProcessTracker.pollingInterval)
430+
assert.strictEqual(tracker.has(runningProcess2.childProcess), true, 'second process was mistakenly removed')
431+
assert.strictEqual(
432+
tracker.has(runningProcess1.childProcess),
433+
false,
434+
'first process was not removed after stopping it'
435+
)
436+
437+
await stopAndWait(runningProcess2)
438+
await clock.tickAsync(ChildProcessTracker.pollingInterval)
439+
assert.strictEqual(
440+
tracker.has(runningProcess2.childProcess),
441+
false,
442+
'second process was not removed after stopping it'
443+
)
444+
445+
assert.strictEqual(tracker.size(), 0, 'expected tracker to be empty')
446+
})
448447

449448
it('logs a warning message when system usage exceeds threshold', async function () {
450449
const runningProcess = startSleepProcess()

0 commit comments

Comments
 (0)