FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore(tests): improve unit test output by daniel-sanche · Pull Request #18123 · googleapis/google-cloud-python · GitHub

chore(tests): improve unit test output - #18123

Open
daniel-sanche wants to merge 14 commits into
googleapis:mainfrom
daniel-sanche:bigtable_ci
Open

chore(tests): improve unit test output#18123
daniel-sanche wants to merge 14 commits into
googleapis:mainfrom
daniel-sanche:bigtable_ci

Conversation

daniel-sanche commented Aug 14, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

In #18122, the tests would stall without any logs after Running tests across 1 package(s) using 1 parallel worker(s)...

This is because the unit test job would wait until tests were complete before printing outputs, which isn't helpful when a job freezes

This PR attempts to improve the usability of unit tests by:

  • showing live logs when PARALLEL_WORKERS is 1
    • this is always the case for unit tests, but mypy runs in parallel
    • parallel jobs still buffer their writes, to avoid overlapping logs
  • fail-fast. If one nox session or package fails, the CI worker exits with an error immediately
  • use emojis to designate pass/fail (✅/❌), to make it logs to scan
  • added --no-tags, to avoid unneeded download and printing

gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Code Review

This pull request introduces real-time log streaming in the CI test runner when running with a single worker, while maintaining buffered logs for parallel execution. It also adds a global autouse fixture to mock the MetricServiceClient in unit tests and ensures proper cleanup of GoogleCloudMetricsHandler instances using try-finally blocks. Feedback is provided regarding a potential bash error in the test runner script when checking the PARALLEL_WORKERS variable if it is unset or empty.

Comment thread ci/run_conditional_tests.sh Outdated
daniel-sanche changed the title [DRAFT] tests(bigtable): mock metric client in unit tests [DRAFT] tests(bigtable): close metric client resources in unit tests Aug 14, 2026
daniel-sanche and others added 4 commits August 14, 2026 13:33
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
daniel-sanche added the unit_test:all_packages debug label used to trigger unit tests against all packages in a PR label Aug 14, 2026
daniel-sanche changed the title [DRAFT] tests(bigtable): close metric client resources in unit tests [DRAFT] chore(tests): improve unit test output Aug 14, 2026
daniel-sanche changed the title [DRAFT] chore(tests): improve unit test output chore(tests): improve unit test output Aug 14, 2026
daniel-sanche marked this pull request as ready for review August 14, 2026 23:11
daniel-sanche requested a review from a team as a code owner August 14, 2026 23:11
daniel-sanche marked this pull request as draft August 17, 2026 22:25
daniel-sanche marked this pull request as ready for review August 20, 2026 00:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unit_test:all_packages debug label used to trigger unit tests against all packages in a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL