Skip to content

fix(testing): reduce flakiness in extension e2e tests #5481

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

Merged
merged 10 commits into from
Aug 22, 2022

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Aug 19, 2022

This PR modifies our e2e test to reduce flakiness in the extension tests.

Fixes #5472

@jsjoeio jsjoeio self-assigned this Aug 19, 2022
@jsjoeio jsjoeio linked an issue Aug 19, 2022 that may be closed by this pull request
@jsjoeio jsjoeio force-pushed the 5472-testing-fix-vscode_proxy_uri-flakiness branch from ef74ce8 to acb6531 Compare August 19, 2022 22:13
- add new info message when extension loads
- prefix vscode_proxy_uri message with "proxyUri:" to make it easier to
  find in e2e test
- activate extension onStartupFinished
@jsjoeio jsjoeio temporarily deployed to npm August 19, 2022 22:18 Inactive
@codecov
Copy link

codecov bot commented Aug 19, 2022

Codecov Report

Merging #5481 (567eb83) into main (33ee184) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5481   +/-   ##
=======================================
  Coverage   72.44%   72.44%           
=======================================
  Files          30       30           
  Lines        1673     1673           
  Branches      366      366           
=======================================
  Hits         1212     1212           
  Misses        398      398           
  Partials       63       63           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33ee184...567eb83. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Aug 19, 2022

✨ code-server dev build published to npm for PR #5481!

  • Last publish status: success
  • Commit: 567eb83

To install in a local project, run:

npm install @coder/code-server-pr@5481

To install globally, run:

npm install -g @coder/code-server-pr@5481

This adds two new methods to assist with testing the test extension in
our e2e tests, namely these two methods:
- isTestExtensionLoaded
- reloadUntilTestExtensionIsLoaded

Sometimes code-server loads without loading the test extension. These
methods allow us to reload and guarantee it's loaded.
This modifies the test extension using our new methods to reduce
flakiness by ensuring the test extension has loaded before proceeding
with the test.
@jsjoeio jsjoeio force-pushed the 5472-testing-fix-vscode_proxy_uri-flakiness branch from acb6531 to 1be591c Compare August 19, 2022 22:22
@jsjoeio jsjoeio changed the title 5472 testing fix vscode proxy uri flakiness fix(testing): reduce flakiness in extension e2e tests Aug 19, 2022
@jsjoeio jsjoeio temporarily deployed to npm August 19, 2022 22:27 Inactive
@jsjoeio jsjoeio temporarily deployed to npm August 19, 2022 22:56 Inactive
@jsjoeio jsjoeio temporarily deployed to npm August 19, 2022 23:33 Inactive
@jsjoeio jsjoeio marked this pull request as ready for review August 22, 2022 16:37
Comment on lines 297 to 299
await this.page.waitForLoadState("load")
// Give it an extra second just in case it's feeling extra slow
await this.page.waitForTimeout(1000)
Copy link
Member

Choose a reason for hiding this comment

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

We do the same in reloadUntilEditorIsReady so I wonder if we can omit?

@code-asher
Copy link
Member

Great sleuthing on the flakiness!!

jsjoeio and others added 2 commits August 22, 2022 09:56
Co-authored-by: Asher <ash@coder.com>
Co-authored-by: Asher <ash@coder.com>
@jsjoeio jsjoeio temporarily deployed to npm August 22, 2022 17:04 Inactive
@jsjoeio jsjoeio temporarily deployed to npm August 22, 2022 17:53 Inactive
@jsjoeio jsjoeio temporarily deployed to npm August 22, 2022 18:19 Inactive
@jsjoeio jsjoeio marked this pull request as draft August 22, 2022 18:21
@jsjoeio jsjoeio requested a review from code-asher August 22, 2022 18:35
@jsjoeio jsjoeio marked this pull request as ready for review August 22, 2022 18:35
@jsjoeio jsjoeio temporarily deployed to npm August 22, 2022 18:43 Inactive
@jsjoeio jsjoeio merged commit 8352a22 into main Aug 22, 2022
@jsjoeio jsjoeio deleted the 5472-testing-fix-vscode_proxy_uri-flakiness branch August 22, 2022 19:47
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 this pull request may close these issues.

[Testing]: fix VSCODE_PROXY_URI flakiness
2 participants