Conversation
Summary of ChangesHello @fi3ework, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the stability of end-to-end tests by addressing a common source of flakiness: race conditions between process termination and output stream completion. By ensuring that all standard output and error streams are fully processed before evaluating a command's exit code, the changes make test assertions more robust and reliable, leading to a more consistent CI pipeline. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses flaky E2E tests by ensuring that stdout and stderr streams are fully closed before asserting process exit codes. This is achieved by introducing promises that resolve on the 'end' event of these streams and awaiting them in the test helper functions expectExecSuccess and expectExecFailed. The changes are logical and directly address the race condition described. I have one suggestion to improve code maintainability by reducing duplication.
There was a problem hiding this comment.
Pull request overview
This PR addresses race conditions in E2E tests that were causing flaky failures in browser mode by ensuring that stdout and stderr streams have fully closed before asserting exit codes.
Changes:
- Added stream end tracking with
stdoutEndedandstderrEndedpromises in theCliclass constructor - Implemented
waitForStreamsEnd()method to wait for both streams to finish - Updated
expectExecSuccessandexpectExecFailedhelpers to wait for stream completion before checking exit codes
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
expectExecSuccessandexpectExecFailedhelpersRelated Links
Checklist