test(downloader): scale down test object and chunk sizes to speed up tests#4814
test(downloader): scale down test object and chunk sizes to speed up tests#4814geertj wants to merge 1 commit into
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 focuses on optimizing the downloader package's test suite to improve developer productivity by reducing execution time. It also includes a critical fix for a race condition in one of the asynchronous download tests to ensure test stability. Highlights
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 the 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 counterproductive. 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 scales down the test object sizes, chunk sizes, and offsets across several downloader test files (job_test.go, parallel_downloads_job_test.go, and sparse_downloads_job_test.go) to optimize test execution. Additionally, it updates Test_Download_CtxCancelled to wait for the background async download to complete, preventing potential test flakiness. There are no review comments, so I have no feedback to provide.
7c7d834 to
a8b85a4
Compare
…tests Optimized the test suite for the downloader package by scaling down the mock GCS object sizes and parallel/sparse download chunk sizes, reducing execution time from ~26s down to ~4.3s (a ~6x speedup). Also fixed a race condition in Test_Download_CtxCancelled by reducing the timeout to 1ns to ensure immediate expiration and waiting on the async job completion channel (doneCh) before performing assertions on the downloaded file. TAG=agy CONV=8c7b5ab6-91ae-4a84-911e-1788917d5ab8
a8b85a4 to
e3308f6
Compare
|
@geertj, tried triggering the CI checks from UI by changing the base branch, but got into bad state. Maybe you can try adding empty-commit once to re-trigger freshly. |
Optimized the test suite for the downloader package by scaling down the mock GCS object sizes and parallel/sparse download chunk sizes, reducing execution time from ~26s down to ~4.3s (a ~6x speedup).
Also fixed a race condition in Test_Download_CtxCancelled by reducing the timeout to 1ns to ensure immediate expiration and waiting on the async job completion channel (doneCh) before performing assertions on the downloaded file.
TAG=agy
CONV=8c7b5ab6-91ae-4a84-911e-1788917d5ab8