Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retryTo leads to stale process on failure #4197

Open
cjhille opened this issue Feb 13, 2024 · 4 comments · May be fixed by #4367
Open

retryTo leads to stale process on failure #4197

cjhille opened this issue Feb 13, 2024 · 4 comments · May be fixed by #4367

Comments

@cjhille
Copy link
Contributor

cjhille commented Feb 13, 2024

I'm sorry @kobenguyent, but we must have missed a regression with the last fix here #4110

It works fine as long as assertions are a success, but as soon as there is a failure – even outside the retryTo block – the test never terminates.

Simple test code:

Feature('foo');

Scenario('test issue', async ({ I }) => {
    I.amOnPage('http://example.org')
    I.waitForVisible('.nothing', 1); // should fail here but it won't terminate
    await retryTo( (tryNum) => {
        I.see(".doesNotMatter");
    }, 10);
});

EDIT: Adding an irregular await before the failing assertion await I.waitForVisible('.nothing', 1) will let the promise chain resolve.

image
Copy link

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label May 14, 2024
@cjhille
Copy link
Contributor Author

cjhille commented May 14, 2024

The issue still persists (see test case). Unfortunately, retryTo can not be used currently. FYI @DavertMik

@kobenguyent
Copy link
Collaborator

hey @cjhille I reverted those fixes at https://github.com/codeceptjs/CodeceptJS/pull/4117/files#diff-3799cca2cab187279c2a50bbd0c3a7451b24e20da2bdad08d42eb95444d392baR92 but the issue still persists, so I think it's coming from somewhere else.

Screenshot 2024-05-29 at 07 51 15

@kobenguyent
Copy link
Collaborator

per my initial thinking, I guess the issue is from waitForVisible

Screenshot 2024-05-29 at 07 57 23

@kobenguyent kobenguyent linked a pull request May 29, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants