fix: resolve workspace publish failures and scheduler event loop starvation (#28063)

This commit is contained in:
Ramón Medrano Llamas
2026-06-21 23:27:18 +02:00
committed by GitHub
parent c22137ea0a
commit be7ba2c22a
5 changed files with 29 additions and 12 deletions
+6
View File
@@ -365,6 +365,8 @@ export class TestRig {
_lastRunStderr?: string;
// Path to the copied fake responses file for this test.
fakeResponsesPath?: string;
// Whether to run fake responses in non-strict mode.
fakeResponsesNonStrict?: boolean;
// Original fake responses file path for rewriting goldens in record mode.
originalFakeResponsesPath?: string;
private _interactiveRuns: InteractiveRun[] = [];
@@ -377,6 +379,7 @@ export class TestRig {
settings?: Record<string, unknown>;
state?: Record<string, unknown>;
fakeResponsesPath?: string;
fakeResponsesNonStrict?: boolean;
} = {},
) {
this.testName = testName;
@@ -398,6 +401,7 @@ export class TestRig {
if (options.fakeResponsesPath) {
this.fakeResponsesPath = join(this.testDir, 'fake-responses.json');
this.originalFakeResponsesPath = options.fakeResponsesPath;
this.fakeResponsesNonStrict = options.fakeResponsesNonStrict;
if (process.env['REGENERATE_MODEL_GOLDENS'] !== 'true') {
fs.copyFileSync(options.fakeResponsesPath, this.fakeResponsesPath);
}
@@ -558,6 +562,8 @@ export class TestRig {
if (this.fakeResponsesPath) {
if (process.env['REGENERATE_MODEL_GOLDENS'] === 'true') {
initialArgs.push('--record-responses', this.fakeResponsesPath);
} else if (this.fakeResponsesNonStrict) {
initialArgs.push('--fake-responses-non-strict', this.fakeResponsesPath);
} else {
initialArgs.push('--fake-responses', this.fakeResponsesPath);
}