test(cl): run ';' expect cases and skip output diff only#1743
test(cl): run ';' expect cases and skip output diff only#1743luoliwoshang wants to merge 1 commit intogoplus:mainfrom
Conversation
Summary of ChangesHello, 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 refactors the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly changes the behavior for test cases where expect.txt contains a semicolon, so that they are executed but their output is not compared. The change is well-implemented by moving the check after the test execution. The addition of a regression test is excellent for ensuring this new logic is preserved.
I have one suggestion regarding the test implementation strategy. The use of package-level variables for mocking, while effective, can limit the ability to run tests in parallel. I've added a comment with more details on this point for future consideration.
|
The behavioral change is sound — semicolon-marked tests now actually execute and catch runtime failures instead of being silently skipped. The main concern is the package-level mutable function variables introduced for test mocking: they create a data race risk under parallel test execution and add indirection that's only half-used. Consider dependency injection via |
|
-- FAIL: TestRunFromTestlibgo (145.71s) |
|
2026-03-24T02:58:21.4140780Z cltest.go:236: run failed: run failed: exit status 1 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1743 +/- ##
==========================================
+ Coverage 93.15% 93.16% +0.01%
==========================================
Files 48 48
Lines 13352 13349 -3
==========================================
- Hits 12438 12437 -1
+ Misses 727 726 -1
+ Partials 187 186 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6382160 to
9dc6bd9
Compare
Fixes #1742
Summary
testRunFromsoexpect.txt == ';'means run-only / no-diff instead of early returncl/cltest/cltest_test.goregression test to ensure semicolon-marked cases still executeBehavior Change
Before:
expect.txt == ';'skipped execution entirelyAfter:
RunAndCapture*Validation
go test ./cl/cltest -run TestTestRunFromSemicolonStillRuns -count=1 -vgo test ./cl -run TestFilterEmulatorOutput -count=1