Skip to content

test: add t.Parallel() to util collections, io, rand, security tests (#27423)#27771

Open
GuruduGanesh wants to merge 1 commit intoargoproj:masterfrom
GuruduGanesh:feat/27423-parallel-unit-tests
Open

test: add t.Parallel() to util collections, io, rand, security tests (#27423)#27771
GuruduGanesh wants to merge 1 commit intoargoproj:masterfrom
GuruduGanesh:feat/27423-parallel-unit-tests

Conversation

@GuruduGanesh
Copy link
Copy Markdown

@GuruduGanesh GuruduGanesh commented May 10, 2026

…(#27423)

Description

Refs #27423.

Adds t.Parallel() to a small batch of utility unit tests where the tests are isolated and safe to run in parallel.

This updates tests under:

  • util/collections
  • util/io
  • util/io/path
  • util/rand
  • util/security

TestGetPathIfExists is intentionally left sequential because its subtests share the same RandomizedTempPaths instance and depend on execution order. The "does not exist" case must run before the "does exist" case populates the path.

TestGetPaths_no_race is also intentionally left sequential because it is a race smoke test that starts goroutines using testing.T.

Testing

go vet ./util/...
make lint-local
make TEST_MODULE="./util/collections ./util/io ./util/io/path ./util/rand ./util/security" test-local
make TEST_MODULE="./util/collections ./util/io ./util/io/path ./util/rand ./util/security" test-race-local
make build-local

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@GuruduGanesh GuruduGanesh requested a review from a team as a code owner May 10, 2026 05:39
@bunnyshell
Copy link
Copy Markdown

bunnyshell Bot commented May 10, 2026

✅ Preview Environment deployed on Bunnyshell

Component Endpoints
argocd https://argocd-bzjgad.bunnyenv.com/
argocd-ttyd https://argocd-web-cli-bzjgad.bunnyenv.com/

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔴 /bns:stop to stop the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.96%. Comparing base (5ec0603) to head (ef5b7cb).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #27771   +/-   ##
=======================================
  Coverage   63.96%   63.96%           
=======================================
  Files         421      421           
  Lines       57774    57774           
=======================================
+ Hits        36954    36956    +2     
+ Misses      17339    17337    -2     
  Partials     3481     3481           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GuruduGanesh GuruduGanesh force-pushed the feat/27423-parallel-unit-tests branch from 4a8a406 to ef5b7cb Compare May 10, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant