last time oops

Signed-off-by: Alex Schwartz <alexschwartz01@gmail.com>
This commit is contained in:
Alex Schwartz 2025-02-22 08:45:28 -05:00 committed by GitHub
parent 579d8652db
commit 84791086b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -394,7 +394,7 @@ export class WorkerMain extends ProcessRunner {
const afterHooksTimeout = calculateMaxTimeout(this._project.project.timeout, testInfo.timeout);
const afterHooksSlot = { timeout: afterHooksTimeout, elapsed: 0 };
const FAILURE_AND_CREATE_WORKER = testInfo._isFailure() && this._config.recreateWorkerAfterFailure;
const FAILURE_AND_RECREATE_WORKER = testInfo._isFailure() && this._config.recreateWorkerAfterFailure;
await testInfo._runAsStage({ title: 'After Hooks', stepInfo: { category: 'hook' } }, async () => {
let firstAfterHooksError: Error | undefined;
@ -428,7 +428,7 @@ export class WorkerMain extends ProcessRunner {
// In case of failure the worker will be stopped and we have to make sure that afterAll
// hooks run before worker fixtures teardown.
for (const suite of reversedSuites) {
if (!nextSuites.has(suite) || FAILURE_AND_CREATE_WORKER) {
if (!nextSuites.has(suite) || FAILURE_AND_RECREATE_WORKER) {
try {
await this._runAfterAllHooksForSuite(suite, testInfo);
} catch (error) {
@ -443,7 +443,7 @@ export class WorkerMain extends ProcessRunner {
checkForFloatingPromises('afterAll/afterEach hooks');
if (FAILURE_AND_CREATE_WORKER)
if (FAILURE_AND_RECREATE_WORKER)
this._isStopped = true;
if (this._isStopped) {