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

playwright: Wait for file stat nodes #12310

Merged

Conversation

planger
Copy link
Contributor

@planger planger commented Mar 15, 2023

What it does

The theia-workspace.test.ts checks for existence of file nodes in the explorer view to verify whether the workspace has been prepared correctly. However, occasionally it may happen that the explorer view doesn't show them yet, as the files are just being loaded.

This resulted in occasionally flaky test executions (#12063).

To fix this problem, we now use the existsDirectoryNode and existsFileNode checks to explicitly wait for them to appear and only fail if the check times out.

Contributed on behalf of STMicroelectronics.
Fixes #12063

How to test

There is nothing really to test other than to make sure the playwright tests have passed and to observe in the future whether this reduces the number of flaky test failures in theia-workspace.test.ts.

Review checklist

Reminder for reviewers

The `theia-workspace.test.ts` checks for existence of file nodes in the
explorer view to verify whether the workspace has been prepared
correctly. However, occasionally it may happen that the explorer view
doesn't show them yet, as the files are just being loaded.

This resulted in occasionally flaky test executions (eclipse-theia#12063).

To fix this problem, we now use the `existsDirectoryNode` and
`existsFileNode` checks to explicitly wait for them to appear and
only fail if the check times out.

Contributed on behalf of STMicroelectronics.
Fixes eclipse-theia#12063

Change-Id: I4226a7d6f657c6a1363160655da4c94cd0984379
@vince-fugnitto vince-fugnitto added the playwright issues related to playwright tests label Mar 16, 2023
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
I re-ran the playwright action and it passed 3/3 times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
playwright issues related to playwright tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[playwright] Flaky Playwright test in theia-explorer-view.test.ts:56:9
3 participants