mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-11-18 09:43:04 +00:00
Address PR review feedback (#3340)
- Clean each forced-heal tmpDir in afterEach so earlier cases do not leak - Compare major.minor when version-gating the interrupted-checkpoint plant Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
45ce746167
commit
3594528299
3 changed files with 5 additions and 10 deletions
|
|
@ -149,8 +149,9 @@ describe('interrupted-checkpoint recovery (pooled read path self-heal)', () => {
|
|||
'utf-8',
|
||||
),
|
||||
).version as string;
|
||||
const minor = Number(engineVersion.split('.')[1]);
|
||||
if (Number.isFinite(minor) && minor < 19) {
|
||||
const [major, minor] = engineVersion.split('.').map((part) => Number(part));
|
||||
// Skip only 0.x below 0.19. A 1.0.0 pin is newer than 0.19 and must run.
|
||||
if (Number.isFinite(major) && Number.isFinite(minor) && major === 0 && minor < 19) {
|
||||
ctx.skip();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
* mocked native layer so CI enforces it on the 0.18.3 pin too (where no real
|
||||
* engine emits the refusal).
|
||||
*/
|
||||
import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import fs from 'node:fs/promises';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
|
|
@ -115,9 +115,6 @@ describe('direct adapter self-heals a refused read-only probe (forced refusal)',
|
|||
|
||||
afterEach(async () => {
|
||||
await closeLbug().catch(() => {});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
if (tmpDir) await fs.rm(tmpDir, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
* self-heal — writable open, probe, CHECKPOINT, read-only retry — regardless
|
||||
* of which engine binary is installed.
|
||||
*/
|
||||
import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import fs from 'node:fs/promises';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
|
|
@ -116,9 +116,6 @@ describe('pool adapter self-heals a refused read-only open (forced refusal)', ()
|
|||
|
||||
afterEach(async () => {
|
||||
await closeLbug(REPO).catch(() => {});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
if (tmpDir) await fs.rm(tmpDir, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue