-
Notifications
You must be signed in to change notification settings - Fork 81
tests: Tests stability improvements and code refactor #1802
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| if (!appWebsocket) { | ||
| reject(new Error("No websocket connection")); | ||
|
|
||
| if (!appWebsocket || appWebsocket.readyState !== 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (!appWebsocket || appWebsocket.readyState !== 1) { | |
| if (!appWebsocket || appWebsocket.readyState !== WebSocket.OPEN) { |
| reject( | ||
| new Error( | ||
| `Websocket not connected or not ready. State: ${ | ||
| appWebsocket ? appWebsocket.readyState : "null" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT:
Isn't this the same as
| appWebsocket ? appWebsocket.readyState : "null" | |
| appWebsocket?.readyState |
| try { | ||
| const msg = JSON.parse(message); | ||
| if (msg.id === id) { | ||
| clearTimeout(timer); | ||
| appWebsocket.off("message", handler); | ||
| resolve(msg); | ||
| } | ||
| } catch (e) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we really just ignore the errors from parsing message here? It would seem to me that it indicates a bug in the tests, and should be reported.
| const fullPath = path.join(process.cwd(), "data", filename); | ||
| await quickInput.sendKeys(fullPath); | ||
| await this.driver.sleep(TIMEOUTS.SHORT); | ||
| // await quickInput.sendKeys(Key.ENTER); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the comment, or uncomment the line if it was removed by mistake
| // await quickInput.sendKeys(Key.ENTER); |
This Pull Request introduces significant stability improvements to address flaky CI tests. While further optimizations may be required, this PR is being submitted now due to its increasing size. Additionally, it includes code refactoring to improve readability.
How Has This Been Tested:
Tests have been executed on local CI. They seem to work much better after changes.
How Has This Change Been Documented:
No documentation changes are required.