Skip to content

Flake in test-js #7948

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

Closed
ammario opened this issue Jun 9, 2023 · 4 comments
Closed

Flake in test-js #7948

ammario opened this issue Jun 9, 2023 · 4 comments
Labels
s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks

Comments

@ammario
Copy link
Member

ammario commented Jun 9, 2023

See example run

cc @coder/ts

@ammario ammario added the flake label Jun 9, 2023
@cdr-bot cdr-bot bot added the bug label Jun 9, 2023
@Kira-Pilot
Copy link
Member

I tried to reproduce this flake locally by running it 1000 times with Jest's it.each method to no avail. I have seen the same error in CI, but only very recently.
Screenshot 2023-06-12 at 3 26 24 PM

Given this test has been in production for over a year without flaking continuously, I am wondering if the culprit is actually the same CI agent flake we've been running into on the Go side? I notice we are actually opening the workspaceagent websocket in this test - perhaps we could mock that out somehow instead to avoid this issue.
@code-asher I see that you were the original author - does the above seem reasonable?

@code-asher
Copy link
Member

It looks like we are mocking out the web socket, I think? We create a websocket with jest-websocket-mock then we send text on that (essentially acting as the backend) and expect that text to show up in the terminal.

The linked run reports the string in the first row is " "; I wonder if xterm.js sometimes renders a row with a space in it for...some reason. There was that recent xterm.js major version update. Could be something related to that.

Maybe if we check all the rows for the expected text instead of just the first one.

@Kira-Pilot
Copy link
Member

Ah, you're right - I missed the mock. Good idea about xterm - I'll do some digging this week between sprint work.

@bpmct bpmct added the s3 Bugs that confuse, annoy, or are purely cosmetic label Aug 7, 2023
@matifali matifali added s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks and removed s3 Bugs that confuse, annoy, or are purely cosmetic s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks labels Aug 24, 2023
@mtojek
Copy link
Member

mtojek commented Sep 29, 2023

I have a feeling that it is stale issue. Feel free to reopen when it bumps up again.

@mtojek mtojek closed this as completed Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks
Projects
None yet
Development

No branches or pull requests

6 participants