Skip to content

Conversation

@julio-lopez
Copy link
Collaborator

@julio-lopez julio-lopez commented Aug 22, 2025

Leverage require.Eventually to prevent indefinite test hangs / timeouts, removes blocking receive op on a channel

Additional cleanups:

  • rename test file
  • remove unused const
  • consistently use testloggin.Context(t)
  • consistently leverage assertions from the testify package

Refs:

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR makes the azure.TestUserAgent test more robust by replacing a blocking channel operation with atomic variables and require.Eventually to prevent test hangs and timeouts. The changes also improve consistency across Azure provider tests by standardizing the use of testify assertions and testlogging.

  • Replaced blocking channel receive with atomic bool and require.Eventually for non-blocking user agent verification
  • Standardized test context usage to testlogging.Context(t) across Azure tests
  • Cleaned up error handling by consistently using testify assertions instead of manual error checking

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
repo/blob/azure/azure_test.go Refactored TestUserAgent to use atomic variables and Eventually instead of blocking channels
repo/blob/azure/azure_storage_test.go Standardized error handling with testify assertions and consistent context usage
.github/workflows/providers-core.yml Removed unused environment variable for SAS token

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@julio-lopez
Copy link
Collaborator Author

FYI: @andrason

@codecov
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.39%. Comparing base (cb455c6) to head (4fbdf9b).
⚠️ Report is 635 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4781      +/-   ##
==========================================
+ Coverage   75.86%   76.39%   +0.52%     
==========================================
  Files         470      530      +60     
  Lines       37301    40443    +3142     
==========================================
+ Hits        28299    30896    +2597     
- Misses       7071     7503     +432     
- Partials     1931     2044     +113     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@julio-lopez julio-lopez marked this pull request as ready for review August 22, 2025 05:44
@julio-lopez julio-lopez merged commit 1f5a923 into kopia:master Aug 22, 2025
31 checks passed
@julio-lopez julio-lopez deleted the harden-azure-user-agent-test branch August 22, 2025 05:47
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